您的位置:首页 > 产品设计 > UI/UE

UIAlertController的使用二

2015-07-28 18:57 351 查看
UIAlertController *actionSheetController = [UIAlertController alertControllerWithTitle:@"action选项" message:nil
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *action0 = [UIAlertAction
actionWithTitle:@"选项一"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self customMethod1];
}];
[actionSheetController addAction:action0];

UIAlertAction *action = [UIAlertAction
actionWithTitle:@"选项二"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self <span style="font-family: Arial, Helvetica, sans-serif;">customMethod2</span>];
}];
UIAlertAction *action1 = [UIAlertAction
actionWithTitle:@"选项三"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {

[self customMethod3];
}];
UIAlertAction *actionCancel = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {}];

[actionSheetController addAction:action];
[actionSheetController addAction:action1];
[actionSheetController addAction:actionCancel];
[actionSheetController.view
setTintColor:[UIColor
greenColor]];
[self
presentViewController:actionSheetController
animated:YES
completion:nil];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: