UIActionSheet添加多个otherButtonTitles
来源:互联网 发布:模拟炒股大赛 知乎 编辑:程序博客网 时间:2024/06/06 03:35
关于UIActionSheet,我们经常用到的就是
UIActionSheet *actionSheet = [[UIActionSheetalloc]initWithTitle:@"请选择"delegate:selfcancelButtonTitle:@"取消"destructiveButtonTitle:@"确定"otherButtonTitles:@"1",@"2",@"3",nil];
但是当otherButtonTitles要显示一个数组的时候并不是用[AryobjectAtIndex:i]
如果这样用的话就会出错,就算不出错,也会pop[Ary count]次
所以,可以这样
UIActionSheet *actionSheet = [[UIActionSheetalloc]initWithTitle:@"请选择"delegate:selfcancelButtonTitle:@"取消"destructiveButtonTitle:@"确定"otherButtonTitles:nil];
//
for(int j=0;j<[allArycount];j++)
{
NSString *str=[[NSStringalloc]initWithFormat:@"%@",[allAryobjectAtIndex:j]];
[actionSheetaddButtonWithTitle:str];
}
[actionSheetshowInView:self.view];
大功告成 1 0
- UIActionSheet添加多个otherButtonTitles
- UIActionSheet动态添加按钮
- 动态添加UIActionSheet按钮
- 动态添加UIActionSheet按钮
- UIDatePicker 添加到 UIActionSheet 上
- 动态添加UIActionSheet cancel button
- alertView otherButtonTitles:@“”,@“”崩溃 空格
- UIActionSheet
- UIActionSheet
- UIActionSheet
- UIActionSheet
- UIActionSheet
- UIActionSheet
- UIActionSheet
- UIActionSheet
- UIActionSheet
- UIActionSheet
- UIActionSheet
- JVM与Dalvik VM的比较
- 解决Datagridview虚拟模式下闪烁的问题
- iptables
- bootstrap3-validation表单验证
- JDK1.5新特性
- UIActionSheet添加多个otherButtonTitles
- 简单理解javascript
- C# Thread(线程)使用总结
- C#中3个定时器(timer)
- javascript中去掉字符串的前后多余空格
- 以太网最小帧长为什么是64字节(传输介质和检查机制决定)
- Python正则表达式
- java集合框架—List
- php 二级级联菜单