UIAlertController的使用

作者: 郑州程序员王一 | 来源:发表于2016-11-17 15:14 被阅读62次
基本使用
    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"标题" message:@"标题的提示信息" preferredStyle:UIAlertControllerStyleAlert];
    [alertController addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
        
    }]];
    [alertController addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        
    }]];
    [self presentViewController:alertController animated:YES completion:nil];
基本使用讲解地址

点击跳转

改变UIAlertController的标题、内容的字体和颜色

点击跳转

相关文章

网友评论

    本文标题:UIAlertController的使用

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