iOS原生控件资料整理

UIAlertController的使用

2016-11-17  本文已影响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的标题、内容的字体和颜色

点击跳转

上一篇 下一篇

猜你喜欢

热点阅读