美文网首页
UIAlertView最新写法

UIAlertView最新写法

作者: Devin_明 | 来源:发表于2019-03-20 15:30 被阅读0次

 UIAlertController* alert = [UIAlertControlleralertControllerWithTitle:@"是否退出当前账号"message:nilpreferredStyle:UIAlertControllerStyleAlert];

 UIAlertAction* action1 = [UIAlertActionactionWithTitle:@"取消"style:UIAlertActionStyleDefaulthandler:^(UIAlertAction* _Nonnullaction) {

    }];

 UIAlertAction* action2 = [UIAlertActionactionWithTitle:@"确认"style:UIAlertActionStyleDefaulthandler:^(UIAlertAction* _Nonnullaction) {

 DeviceModel*model = [NSStringgetPhoneInfo];

[alert addAction:action1];

[alert addAction:action2];

    [selfpresentViewController:alert animated:YEScompletion:nil];

相关文章

网友评论

      本文标题:UIAlertView最新写法

      本文链接:https://www.haomeiwen.com/subject/unazmqtx.html