UIAlertController的使用

              /**
               *  弹框提示
               */
       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];

 

posted @ 2016-04-20 10:34  懒懒初阳  阅读(193)  评论(0编辑  收藏  举报