首页 > 技术文章 > UIAlertController的使用

fuunnyy 2016-04-20 10:34 原文

              /**
               *  弹框提示
               */
       UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:@"我要显示的信息"  preferredStyle:UIAlertControllerStyleAlert];
       UIAlertAction *action = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
                  [alertController removeFromParentViewController];
              }];
              [alertController addAction:action];
              [ViewController presentViewController:alertController animated:YES completion:nil];

 

推荐阅读