当我提出我UIViewController同modalPresentationStyle父的UINavigationController设置UIModalPresentationCurrentContext,在UIViewController不滑动,没有使用过渡.
这是我的代码:
UIViewController *viewController = [[UIViewController alloc] init];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
navController.navigationBarHidden = YES;
self.navigationController.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentViewController:navController animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)
当我没有设置modalPresenttionStyle,一切正常.但我需要这种风格,因为我希望UIViewController礼物是叠加的.
BTW:当ViewController被解雇时,动画效果很好.