//
//  ViewController.swift
//  actionsheet
//
//  Created by su on 15/12/7.
//  Copyright © 2015年 tian. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
    //申明一个alertController
    var controller:UIAlertController!
    override func viewDidLoad() {
        super.viewDidLoad()
        //创建UIAlertController实例
        controller = UIAlertController(title: "我们都爱老镇", message: "QQ群:398888638", preferredStyle: UIAlertControllerStyle.ActionSheet)
       
        //创建送飞吻action
        let actionKiss = UIAlertAction(title: "送飞吻", style: UIAlertActionStyle.Default) { (paramAction:UIAlertAction!) -> Void in
            //
        }
        //创建送银子action
        let actionMoney = UIAlertAction(title: "送银子", style: UIAlertActionStyle.Default) { (paramAction:UIAlertAction!) -> Void in
            //
        }
        //创建送妹纸action
        let actionGirl = UIAlertAction(title: "送妹纸", style: UIAlertActionStyle.Destructive) { (paramAction:UIAlertAction!) -> Void in
            //
        }
       
        controller.addAction(actionKiss)
        controller.addAction(actionMoney)
        controller.addAction(actionGirl)
    }
    //重写viewDidAppear
    override func viewDidAppear(animated: Bool) {
        super.viewDidAppear(animated)
        self.presentViewController(controller, animated: true, completion: nil)
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}

 

swift学习之-- UIAlertVIewController - uiactionsheet的更多相关文章

  1. swift 学习之 UIAlertViewController

    // //  PushViewController.swift //  tab // //  Created by su on 15/12/7. //  Copyright © 2015年 tian. ...

  2. swift学习之-- UIAlertViewController -alert

    // //  ViewController.swift //  alertView // //  Created by su on 15/12/7. //  Copyright © 2015年 tia ...

  3. Swift学习之常用UI的使用

    Swift学习之常用UI的使用 最近笔者在开始学习苹果最新的编程语言,因为笔者认为,苹果既然出了这门语言就绝对不会放弃,除非苹果倒闭了(当然这里知识一个玩笑). 所以在不久的将来,swift绝对是iO ...

  4. 【swift学习笔记】二.页面转跳数据回传

    上一篇我们介绍了页面转跳:[swift学习笔记]一.页面转跳的条件判断和传值 这一篇说一下如何把数据回传回父页面,如下图所示,这个例子很简单,只是把传过去的数据加上了"回传"两个字 ...

  5. 今天开始Swift学习

    今天开始Swift学习  在此记录笔记  以备之后查阅! allenhuang

  6. iOS ---Swift学习与复习

    swift中文网 http://www.swiftv.cn http://swifter.tips/ http://objccn.io/ http://www.swiftmi.com/code4swi ...

  7. 12套swift学习资源分享

    虽然objective-c编程语言在过去很长一段时间都是iOS应用开发的基础语言,且很多iOS开发者对其也深爱有佳,但是随着swift编程语言的问世,迅速发展为开发者追捧的语言.且今年伴随着swift ...

  8. [转]swift 学习资源 大集合

    今天看到了一个swift的学习网站,里面收集了很多学习资源 [转自http://blog.csdn.net/sqc3375177/article/details/29206779] Swift 介绍 ...

  9. swift 学习资源 大集合

    今天看到一个swift学习网站,其中我们收集了大量的学习资源 Swift 介绍 Swift 介绍 来自 Apple 官方 Swift 简单介绍 (@peng_gong) 一篇不错的中文简单介绍 [译] ...

随机推荐

  1. (原创)AP6212蓝牙模块在am335x控制板上的应用

    主控板wifi模块调通后接着调试蓝牙,经过两周的摸索,终于把蓝牙应用基本建立起来,下面记录下大概流程. 1.硬件管脚设置 static void uart4_init(int evm_id, int ...

  2. TimeExit 界面无点击定时退出类

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.W ...

  3. unity里面查找所有物体

    测试的时候发现一个很诡异的bug,在prefab里面的物体的属性居然不断的在变化,最后一步步调试才发现,区别是查找物体的api,特此记录下 两种api Canvas[] canvasArray = ( ...

  4. EF-CodeFirst系列100

    .学习资料地址: CodeFirst:https://msdn.microsoft.com/zh-cn/data/jj193542 一.CodeFirst迁移(Migration) .工具--> ...

  5. Django 组件content_type

    content type: django内置组件,这个组件帮忙做连表操作(混搭连表) 适用场景:适用于一张表与多张表同时做关联的时候.直接导入就可以使用了. 关联数据库所有的表:可以快速插入数据,并且 ...

  6. Java 学习思路

    内容中包含 base64string 图片造成字符过多,拒绝显示

  7. 面试总结之MISC(操作系统,网络,数学,软件开发,测试,工具,系统设计,算法)

    操作系统 解释堆和栈的区别. 分配在堆的内存与分配在堆栈的内存有什么不同 分配在堆的内存要手动去释放 线程与进程的区别 多线程中栈与堆是公有的还是私有的 在多线程环境下,每个线程拥有一个栈和一个程序计 ...

  8. LLMNR欺骗工具Responder

    LLMNR(Link-Local Multicast Name Resolution,链路本地多播名称解析)协议是一种基于DNS包格式的协议.它可以将主机名解析为IPv4和IPv6的IP地址.这样用户 ...

  9. [转]MongoDB随笔2:使用查询

    转自:http://www.cnblogs.com/yangecnu/archive/2011/07/16/2108450.html 一.通过查询获取数据 在深入讨论查询之前,首先来了解一下查询返回的 ...

  10. Xcode 中设置部分文件ARC支持

    ARC是什么 ARC是iOS 5推出的新功能,全称叫 ARC(Automatic Reference Counting).简单地说,就是代码中自动加入了retain/release,原先需要手动添加的 ...