UIAlertController

来源:互联网 发布:linux 替换分隔符 编辑:程序博客网 时间:2024/05/18 13:43
- (IBAction)backAction:(id)sender {    //初始化    UIAlertController *alert     = [UIAlertController alertControllerWithTitle:@"是否注销?" message:@"真的要注销吗" preferredStyle:UIAlertControllerStyleActionSheet];    //添加按钮    [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil]];    [alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {        [self.navigationController popViewControllerAnimated:YES];    }]];    //弹出    [self presentViewController:alert animated:YES completion:NULL];}
0 0