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

UIAlertController使用

2016-07-21 14:41 423 查看
UIAlertController* alertC = [UIAlertController alertControllerWithTitle:@"确认要离开吗?" message:@"离开的话已填的数据就没了哦" preferredStyle:UIAlertControllerStyleAlert]; //style分为中间弹出,还是底下弹出列表
UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction* _Nonnull action) {

}];
UIAlertAction* doneAction = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction* _Nonnull action) {

}];
[alertC addAction:cancelAction];
[alertC addAction:doneAction];

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