UIActionSheet的用法
来源:互联网 发布:motec软件 编辑:程序博客网 时间:2024/06/14 17:34
首先展示一下什么事UIActionSheet,如图:
1>首先使用UIActionSheet的控制器得要遵守协议,并实现协议方法:
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{ if (buttonIndex != 0) return; //0指按了确定。如果按键多了可以用case语句。 [self.navigationController popViewControllerAnimated:YES];//如果选择了确定,既将此控制器从根视图控制器中推出。}
2>UIActionSheet是由于某些操作才会触发的,不如按键之类的,所以相应的代码大概类似下面:
- (IBAction)back:(id)sender { UIActionSheet *ic =[[UIActionSheet alloc ]initWithTitle:@"重要提示" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"确定" otherButtonTitles:nil, nil]; [ic showInView:self.view];//不要忘记将ic显示到当前控制器的View里面。}
0 0
- iOS UIActionSheet的用法
- UIActionSheet的用法
- 显示对话框 UIActionSheet 的用法.
- UIActionSheet 用法
- UIActionSheet用法
- 介绍UIALertView和UIActionSheet的用法。
- iOS UIAlertView和UIActionSheet的用法
- 介绍UIALertView和UIActionSheet的用法。
- 介绍UIALertView和UIActionSheet的用法。
- iOS9中UIAlertView和UIActionSheet的用法
- UIActionSheet动态选项用法
- iphone开发 UIActionSheet(操作表) 和UIAlertView(警告)的用法
- iOS8 UIAlertView 和 UIActionSheet 的新用法 UIAlertController详解
- UIActionSheet的使用
- UIActionsheet的block实现
- UIActionSheet的使用
- UIActionSheet的使用详解
- UIActionSheet 的使用
- hadoop常去的网站
- 疯狂android 讲义夜读笔记:android drawable小错误的解决
- PaaS 7层动态路由的若干实现
- TCP的三次握手(建立连接)和四次挥手(关闭连接)
- Log4j2+ELK使用说明
- UIActionSheet的用法
- 【知识扩展】内购的代码实现
- 网络字节序
- Unity中的Input.Touch,移动端的触摸操作
- 【歌词】创业像开着会爆炸的飞机
- 专访CMU邢波教授:机器学习与医疗大数据,及大规模机器学习系统的开发
- 水下无线充电设想
- 在.Net中进行跨线程的控件操作(上篇:Control.Invoke)
- [转] JS实例操作QQ空间自动点赞方法