I change the root view controller this way
window.rootViewController==viewController
The current root view controller is in landscape orientation, and with no status bar :
-(UIInterfaceOrientationMask)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskLandscapeLeft;
}
-(BOOL)shouldAutorotate {
return YES;
}
-(BOOL)prefersStatusBarHidden{
return YES;
}
- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation {
return UIStatusBarAnimationNone;
}
The new root view controller, is in portrait mode, with status bar displayed :
-(UIInterfaceOrientationMask)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskPortrait;
}
-(BOOL)shouldAutorotate {
return YES;
}
-(BOOL)prefersStatusBarHidden{
return NO;
}
- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation {
return UIStatusBarAnimationNone;
}
I don't want the transition is animated. window.rootViewController==viewController was working fine on iOS14, but since iOS15, when the root view controller is changed, I can see a weird animation of the status bar, transitioning from landscape to portrait. Any ideas how to not show this status bar animation ?
