UIAlertView与UIActionSheet的动态添加
来源:互联网 发布:抽奖软件 破解版 编辑:程序博客网 时间:2024/06/07 10:09
UIAlertView和UIActionSheet 为我们提供了简便的选择模式。然而有时候我们不能确定选择框中“选项”的个数,那么就需要动态来解决这个问题,其实灰常简单~。
正常添加UIAlertView
UIAlertView *alert = [[UIAlertViewalloc] initWithTitle:nilmessage:nildelegate:selfcancelButtonTitle:@"取消"otherButtonTitles:@“11”,@“22”,@“33”,@“44”,nil];
alert.delegate =self;
[alert show];
动态添加UIAlertView
UIAlertView *alert = [[UIAlertViewalloc] initWithTitle:nilmessage:nildelegate:selfcancelButtonTitle:@"取消"otherButtonTitles:nil];
[alertaddButtonWithTitle:@"11"];
[alertaddButtonWithTitle:@"22"];
[alertaddButtonWithTitle:@"33"];
[alertaddButtonWithTitle:@"44"];
alert.delegate = self;
[alert show];
正常添加UIActionSheet
UIActionSheet *actionSheet = [[UIActionSheetalloc] initWithTitle:nildelegate:selfcancelButtonTitle:@"取消"destructiveButtonTitle:@"确定"otherButtonTitles:@"11",nil];
actionSheet.delegate =self;
[actionSheetshowInView:self.view];
动态添加UIActionSheet
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"确定" otherButtonTitles:@"11", nil];
[actionSheetaddButtonWithTitle:@"22"];
[actionSheetaddButtonWithTitle:@"33"];
[actionSheetaddButtonWithTitle:@"44"];
actionSheet.delegate = self;
[actionSheet showInView:self.view];
- UIAlertView与UIActionSheet的动态添加
- UIActionSheet与UIAlertView
- UIActionSheet与UIAlertView
- UIActionSheet与UIAlertView
- UIActionSheet与UIAlertView
- UIAlertView,UIActionSheet的使用
- iOS开发:UIActionSheet与UIAlertView
- UIAlertController的使用(ios9.0后代替UIAlertView与UIActionSheet)
- 给UIAlertView UIActionSheet 添加block支持
- 给UIAlertView UIActionSheet 添加block支持
- UIActionSheet动态添加按钮
- 动态添加UIActionSheet按钮
- 动态添加UIActionSheet按钮
- UIAlertview UIActionSheet
- UIAlertView&UIActionSheet
- UIAlertView、UIActionSheet
- UIAlertView、UIActionSheet
- iOS开发6:UIActionSheet与UIAlertView
- Android 代码混淆和破解apk
- 概率问题
- ORM、JPA、Hibernate简单说明
- 【浅墨Unity3D Shader编程】
- NSString中搜索方法rangeOfString
- UIAlertView与UIActionSheet的动态添加
- Dialog无黑边框
- Linux GCC常用命令
- checkbox实现全选和反选代码
- 杭电ACM1004
- 2016软件开发的七大趋势
- 生产服务器环境最小化安装后Centos 6.5优化配置备忘
- onMeasure的完美表述
- jQuery跳跃性的无缝滚动