- (void)showActionSheetWithButtons:(NSArray *)buttons withTitle:(NSString *)title {
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle: title
delegate: self
cancelButtonTitle: nil
destructiveButtonTitle: nil
otherButtonTitles: nil];
for (NSString *title in buttons) {
[actionSheet addButtonWithTitle: title];
}
[actionSheet addButtonWithTitle: @"Cancel"];
[actionSheet setCancelButtonIndex: [buttons count]];
[actionSheet showInView:[UIApplication sharedApplication].keyWindow];
}
UIActionSheet比较标准的写法
转载文章标签 22 文章分类 JavaScript 前端开发
上一篇:iOS Objective c 16进制字符串转为二进制数组
下一篇:JMS
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
jquery Ajax的标准写法
Ajax异步处理数据,在Java与前端进行数据交互中经常用到,今天我特地总结一下,希望对大家有所帮助。Ajax的标准写法:$.ajax({ type:"post",
ajax jquery 前端 异步 jquery ajax