我的应用程序是使用 UINavigationController 设置的,用于所有导航。我想使用模态转换在应用程序中呈现特定的 View Controller 。问题是我想将新的 VC 嵌入导航 Controller 中,但只是一个 View 需要使用模态动画而不是推送。
如何在 UINavigationController 内的单个 View Controller 上实现此模态动画/过渡?
请记住,在此模态动画发生后,该页面上的按钮将继续按照标准 UINavigationController 推送动画工作。
最佳答案
ITviewViewController *vc = [[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"vc"];
vc.modalPresentationStyle = UIModalPresentationFullScreen;
vc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentViewController:vc animated:YES completion:Nil];
用您的 View Controller 名称替换伪代码。
关于iOS 7 在 UINavigationController 中呈现模态视图?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20133761/