美文网首页
UIAlertController 弹出框使用

UIAlertController 弹出框使用

作者: wangwan | 来源:发表于2016-08-05 09:43 被阅读0次
    NSString *message = @"内容";
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:message preferredStyle:UIAlertControllerStyleAlert];
    [alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        //点击确定后执行的操作;
    }]];
    [self presentViewController:alert animated:true completion:^{
        //显示提示框后执行的事件;
    }];

相关文章

网友评论

      本文标题:UIAlertController 弹出框使用

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