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) 一篇不错的中文简单介绍 [译] ...
随机推荐
- python 常见问题总结
1.ModuleNotFoundError: No module named 'urllib2' 在python3.x版本中,urllib和urllib2包集合成在一个包了import urllib2 ...
- 移植wpa_supplicant2.5及界面配置wifi(原创)
JP5G开发机上需要图形界面配置 wifi网络,为此移植了wpa_supplicant2.5. 1.参考wpa_supplicant-2.5移植与使用l http://blog.csdn.net/hk ...
- hdu 5909 Tree Cutting——点分治(树形DP转为序列DP)
题目:http://acm.hdu.edu.cn/showproblem.php?pid=5909 点分治的话,每次要做一次树形DP:但时间应该是 siz*m2 的.可以用 FWT 变成 siz*ml ...
- Oracle SYS_CONTEXT用法
1. USERENV(OPTION) 返回当前的会话信息. OPTION='ISDBA'若当前是DBA角色,则为TRUE,否则FALSE. OPTION='LANGUAGE'返回数据库的字符集. OP ...
- find 和 find_all 用法
soup = BeautifulSoup(requests.get(url).text, 'html.parser') soup.find('span', class_='item_hot_topic ...
- django rest_framework 框架的使用03
rest_framework的 数据解析器 首先需要知道前端发给后端的数据格式头有哪些: media_type = 'application/json' media_type = 'applicati ...
- Axure RP Extension for Chrome经常损坏
昨天自己修改后的谷歌浏览器插件,才使用了一天,今天刚打开浏览器就弹出了“已停用不支持的扩展程序”提示,第三方扩展程序就这么不受谷歌浏览器待见呢!?好吧,想办法解决! 通过扩展程序里“该扩展程序未列在 ...
- Selenium Webdriver——Chrome调试Xpath
自己通过手写的Xpath要验证是否正确定位到元素,可以通过谷歌浏览器的Console功能(F12) 在console 输入:$x("") 定位去哪儿网的出发输入框: <inp ...
- mac下的一个类似“_kbhit()”实现
#include <sys/select.h> #include <termios.h> #include <sys/ioctl.h> int _kbhit() { ...
- 100 道 Linux 笔试题
1. cron 后台常驻程序 (daemon) 用于: A. 负责文件在网络中的共享 B. 管理打印子系统C. 跟踪管理系统信息和错误 D. 管理系统日常任务的调度 2. 在大多数Linux发行版本中 ...