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) 一篇不错的中文简单介绍 [译] ...
随机推荐
- vue项目修改favicon
首先你的在你的static文件中添加favicon.icon 然后通过以下方式进行修改 1)方式一:修改index.html文件 <link rel="shortcut icon&qu ...
- Ubuntu各种indicator汇总
1. indicator-multiload: 可视化图形显示 sudo apt-get install indicator-multiload 2. indicator-sysmonitor: 以 ...
- Oracle中的一连接语句
首先构建场景 相应表中数据如下: SELECT * FROM EMPLOYEE: SELECT * FROM DEPTINFO; 连接方式: 1. , SELECT E.EMPNAME, D.DEPN ...
- vim自定义配置之autoComplPop设置
BundlenInstall安装autoComplPop vimConfig/plugin/autoComplPop-setting.vim "autocomplpop 设置 let g:A ...
- Think in java.chm 第14章 多线程
例子1引入线程概念通过得到当前线程方式循环主线程做某事 例子2演示了在主线程之外开启多个线程的基本方式 ( new一个extends Thread ) 例子3 ( task extends Threa ...
- Java课程设计---web版斗地主
一. 团队课程设计博客链接 二.个人负责模块和任务说明 负责前后端数据传输 JSP界面的设计 根据后台传来的数据进行页面动态更新 负责Servlet设计 三.自己的代码提交记录截图 四.自己负责模块或 ...
- 两个很经典的拓扑排序题目POJ3687+HDU1285
一.题目链接 POJ:http://poj.org/problem?id=3687 HDU:http://acm.hdu.edu.cn/showproblem.php?pid=1285 二.思路 这两 ...
- 【BZOJ】3191 [JLOI2013]卡牌游戏(概率dp)
题目 传送门:QWQ 分析 算是概率dp不错的题. $ dp[i][j] $表示有i个人时,这i个人中的第j个获胜的概率. 我们把i从1推到n,那么答案就是$ dp[n][i] $ 然后我们规定,第一 ...
- 【BZOJ】1801 [Ahoi2009]chess 中国象棋(dp)
题目 传送门:QWQ 分析 发现我们关心的不是棋子的位置,我们只关心棋子数量就ok. 首先每行每列最多两个棋子.这是显然的. 然后我觉得本题最难的部分就是对行进行讨论,蒟蒻我一直被限制在了对格点讨论. ...
- Mock.js开发中拦截Ajax
Mock.js 是一款前端开发中拦截Ajax请求再生成随机数据响应的工具.可以用来模拟服务器响应. 优点是非常简单方便, 无侵入性, 基本覆盖常用的接口数据类型. 在我们的生产实际中,后端的接口往往是 ...