//
//  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. H3C 交换机基本设置(telnet、SSH、链路聚合)

    http://www.h3c.com/cn/d_201710/1038172_30005_0.htm#_Toc493869056 H3C S5560S-SI&S5130S-SI[LI]& ...

  2. 【monkey】mokey常用事件<二>

    格式:adb shell monkey 事件参数 百分数 事件数,如: adb shell monkey --pct-majornav 100 -v 10 --pct-touch <percen ...

  3. 用PHP收发邮件

    注:在WinForm下怎么试都不好使,最后没办法换成了PHP下,一试就好使了. 这里用到了phpmailer组件,网上有下. 转:phpnow支持ssl的方法 原文出处:http://blog.163 ...

  4. javascript系列--Object.assign实现浅拷贝的原理以及实现

    一.前言 之前在前面一篇学习了赋值,浅拷贝和深拷贝.介绍了这三者的相关知识和区别. 传送门:https://www.mwcxs.top/page/592.html 本文会介绍浅拷贝Object.ass ...

  5. windows mysql默认配置文件

    查询配置目录 select @@basedir; 查询数据目录 select @@datadir; 查询数据库编码 show variables like 'char% my.ini [mysql] ...

  6. request 里面参数设置 (有空瞄下)

    Requests 是用python语言编写的第三方库,基于 urllib,采用 Apache2 Licensed 开源协议的 HTTP 库.它比 urllib 更加方便,完全满足 HTTP 测试需求, ...

  7. yum安装cacti

    环境: centos 6.5 -x64 cacti-0.8.7e.tar.gz mysql yum安装即可 yum服务使用centos自带的就行.如果是红帽请自行解决yum.本文不赘述. **注意:同 ...

  8. 用Msxml2.XMLHTTP 与 Msxml2.ServerXMLHTTP 发生网页请求

    发送 HTTP 请求时,首先想到的一般是 Msxml2.XMLHTTP(Microsoft.XMLHTTP 已经不提倡使用了). ServerXMLHTTP 为不同 Web 服务器之间的服务器安全 H ...

  9. CSS文档流、块级元素、内联元素

    CSS文档流与块级元素(block).内联元素(inline),之前翻阅不少书籍,看过不少文章, 看到所多的是零碎的CSS布局基本知识,比较表面.看过O'Reilly的<CSS权威指南>, ...

  10. np归纳总结(全)第一天

    1.概述 1.np.array()  # 将列表转换为数组 import numpy as np array = [1, 2, 3, 4, 5] array = np.array(array) 2.. ...