- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { UIViewController *vc = [[UIViewController alloc] init]; vc.view.backgroundColor = [UIColor redColor]; // vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; // 淡入淡出 // vc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; // 水平翻转 // vc.modalTransitionStyle = UIModalTransitionStylePartialCurl; // 翻页效果 // vc.modalTransitionStyle = UIModalTransitionStyleCoverVertical; // 从下往上弹出(默认) // vc.modalPresentationStyle = UIModalPresentationFormSheet; // 新弹出的控制器显示在屏幕中央(最常用) // vc.modalPresentationStyle = UIModalPresentationPageSheet; // 新弹出的控制器显示一页 vc.modalPresentationStyle = UIModalPresentationFullScreen; // 新弹出的控制器显示全屏(默认) [self presentViewController:vc animated:YES completion:nil]; }