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