小编zer*_*ent的帖子

当modalPresentationStyle设置为UIModalPresentationCurrentContext时没有动画

当我提出我UIViewControllermodalPresentationStyle父的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被解雇时,动画效果很好.

iphone xcode objective-c presentmodalviewcontroller ios

12
推荐指数
1
解决办法
1578
查看次数