UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlert
??UIAlertController * cancleAlertController = [UIAlertController alertControllerWithTitle:nil message:@"你確定退出登錄?" preferredStyle:UIAlertControllerStyleAlert];
?? ?
//? ? 第一種添加方法
? ? [cancleAlertController addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
?? ? ? ?
? ? ? ? NSLog(@"點擊取消");
?? ? ? ?
? ? }]];
?
??//? ? 第二種添加方法
? ? UIAlertAction * otherAction = [UIAlertAction actionWithTitle:@"確定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
? ? ? ? NSLog(@"點擊確定");
?? ? ? ?
? ? }];
?? ?
? ? [cancleAlertController addAction:otherAction];
? ? //彈出視圖
? ? [self presentViewController:cancleAlertController animated:YES completion:nil];
轉載于:https://www.cnblogs.com/KiVen2015/p/5391661.html
總結
以上是生活随笔為你收集整理的UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlert的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: bzoj3339 Rmq Problem
- 下一篇: 编程技巧及博客资源