swift 创建第一个UIAlertView 和UIActionSheet
来源:互联网 发布:ant java 版本不一致 编辑:程序博客网 时间:2024/05/07 15:20
//创建 UIActionSheet
//一定要指明类型,不编译不通过
func ActionSheet(sender:UITapGestureRecognizer)
{
let actionSheet: UIActionSheet = UIActionSheet(title:"Are you sure?", delegate:self, cancelButtonTitle:"Cancel", destructiveButtonTitle:"Yes,I'm sure!");
actionSheet.showInView(self.view)
}
//actionSheet delegate
func actionSheet(actionSheet: UIActionSheet, clickedButtonAtIndex buttonIndex: Int) {
if buttonIndex == 0{
println("点击位置为\(buttonIndex)")
}
}
//创建UIAlertView
func firstSwift(sender:UIButton)
{
println("第一个button的点击事件")
self.label1.text = "button点击了"
var alert = UIAlertView(title: "⚠", message: "button被点击了", delegate: self, cancelButtonTitle: "知道了")
alert.show()
}
- swift 创建第一个UIAlertView 和UIActionSheet
- Swift UIAlertView/UIActionSheet
- IOS-UIAlertView和UIActionSheet
- UIActionSheet和UIAlertView
- UIAlertView和UIActionSheet
- UIAlertView和UIActionSheet
- Swift UIAlertView(警告视图)、UIActionSheet(操作表)
- Iphone之UIAlertView和UIActionSheet
- UIAlertView 和 UIActionSheet简单应用
- UIAlertController,取代UIAlertView和UIActionSheet
- iOS8 UIAlertController 创建UIAlertView以及UIActionSheet
- UIAlertview UIActionSheet
- UIAlertView&UIActionSheet
- UIAlertView、UIActionSheet
- UIAlertView、UIActionSheet
- iOS8.0 之后UIAlertView和UIActionSheet的创建方式的新变化
- iOS8.0 之后UIAlertView和UIActionSheet的创建方式的新变化
- iOS开发 对话框UIActionSheet和UIAlertView用法
- 去掉eclipse中自动生成的注释//TODO Auto-generated method stub
- tdelete
- 常用的关于时间的方法
- XML与HTML
- Button代码小写,运行时大写
- swift 创建第一个UIAlertView 和UIActionSheet
- 把word转成pdf格式方法分享
- 【j2ee spring】38、巴巴运动网的产品文件的上传
- Android 内存泄露与优化,以及MAT工具
- JS与IOS互调用
- AFN 网络操作与AFNetworking
- 黑马程序员——java基础---正则表达式
- lavaral5单元测试,post方式提交,方式无法进入
- 关于Handler.post(Runnable)