When I'm presenting my UIViewController
with modalPresentationStyle
of the parent UINavigationController
set to UIModalPresentationCurrentContext
, the UIViewController
is not sliding in. There is no transition used.
Here is my code:
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];
When I do not set the modalPresenttionStyle
, everything works fine. But I need this style, because I want the UIViewController
presents as overlay.
BTW: When the ViewController
is dismissed, the animation works fine.