swift学习之-- UIAlertVIewController - uiactionsheet
// 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的更多相关文章
- swift 学习之 UIAlertViewController
// // PushViewController.swift // tab // // Created by su on 15/12/7. // Copyright © 2015年 tian. ...
- swift学习之-- UIAlertViewController -alert
// // ViewController.swift // alertView // // Created by su on 15/12/7. // Copyright © 2015年 tia ...
- Swift学习之常用UI的使用
Swift学习之常用UI的使用 最近笔者在开始学习苹果最新的编程语言,因为笔者认为,苹果既然出了这门语言就绝对不会放弃,除非苹果倒闭了(当然这里知识一个玩笑). 所以在不久的将来,swift绝对是iO ...
- 【swift学习笔记】二.页面转跳数据回传
上一篇我们介绍了页面转跳:[swift学习笔记]一.页面转跳的条件判断和传值 这一篇说一下如何把数据回传回父页面,如下图所示,这个例子很简单,只是把传过去的数据加上了"回传"两个字 ...
- 今天开始Swift学习
今天开始Swift学习 在此记录笔记 以备之后查阅! allenhuang
- iOS ---Swift学习与复习
swift中文网 http://www.swiftv.cn http://swifter.tips/ http://objccn.io/ http://www.swiftmi.com/code4swi ...
- 12套swift学习资源分享
虽然objective-c编程语言在过去很长一段时间都是iOS应用开发的基础语言,且很多iOS开发者对其也深爱有佳,但是随着swift编程语言的问世,迅速发展为开发者追捧的语言.且今年伴随着swift ...
- [转]swift 学习资源 大集合
今天看到了一个swift的学习网站,里面收集了很多学习资源 [转自http://blog.csdn.net/sqc3375177/article/details/29206779] Swift 介绍 ...
- swift 学习资源 大集合
今天看到一个swift学习网站,其中我们收集了大量的学习资源 Swift 介绍 Swift 介绍 来自 Apple 官方 Swift 简单介绍 (@peng_gong) 一篇不错的中文简单介绍 [译] ...
随机推荐
- UEFI +、GPT 、BIOS 、 MBR的关系
1.传统的主板就是传统 BIOS,可在使用 MBR 分区表的硬盘(俗称 MBR磁盘,就是传统常用的模式)上安装32或64位操作系统.同时也支持使用 GUID 分区表的硬盘(俗称GPT磁盘),但该硬盘上 ...
- Linux下利用Shell使PHP并发采集淘宝产品
上次项目中用到<<PHP采集淘宝商品>> 此方法有一个缺点,就是执行效率问题.一个商品采集平均需要0.8秒.那10000个商品采集完需要2个半小时. 首先想到的解决办法是并发. ...
- Spring JUnit org.hibernate.HibernateException: Unable to get the default Bean Validation factory
org.hibernate.HibernateException: Unable to get the default Bean Validation factory <property nam ...
- 设置pip镜像源
修改镜像源 vim ~/.pip/pip.conf windows 当前用户目录\pip\pip.ini 内容 [global] index-url=https://pypi.tuna.tsinghu ...
- vim自定义配置之自动括号
BundlenInstall安装auto-pairs vimConfig/plugin/auto-pairs-setting.vim let g:autopairsflymode=
- jsp页面的基本语法
JSP全称Java Server Pages,顾名思义就是运行中java服务器中页面,也就是在我们JavaWeb中的动态页面,其本质就是一个Servlet. 学习jsp的基本语法主要就是学习服务器是如 ...
- java上传图片到数据库,涉及压缩文件zip/rar上传等
项目中有这个需求: 1)上传文件通过公司平台的校验,校验成功后,通过接口,返回文件流: 2)我们根据这个文件流进行操作.这里,先将文件流复制文件到项目临时目录WEB-INF/temp;文件使用完毕,删 ...
- HTTP协议响应头之Transfer-Encoding:分块传输详解
Http Connection有两种连接方式:短连接和长连接:短连接即一次请求对应一次TCP连接的建立和销毁过程,而长连接是多个请求共用同一个连接这样可以节省大量连接建立时间提高通信效率.目前主流浏览 ...
- 如何更改Windows10的计算机基本信息
请问如何去掉红色框内的内容?优化大师更改无效! 最佳答案 打开注册表,定位到如下路径 1 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Current ...
- uva-10785-模拟水题
模拟题: 1• The name has a predefined length N.名字长度N2• The vowel value and consonant value of the name m ...