I have a custom view controller that can contain two child controllers. The view of one of the controllers becomes visible when the device is in portrait orientation. The view of the other controller becomes visible when the device is in landscape orientation. However, when the landscape orientation view becomes visible, the status bar is retracted to make more space for the particular view. The status bar is turned off after the device returns to portrait mode. This custom view controller is displayed within the UINavigationController .
My problem is that my subtitles are not adjusted properly when changing the visibility of the status bar. As a result, you rotate the device in different directions, as shown in the figure below: 
As you can see, initially it is beautiful (in the portrait), but when the device is rotated, there is a white gap in which there was a status bar. When the device is rotated back to the portrait, the UINavigationController navigation bar rises and overlaps the status bar and a space appears between the navigation bar and the view below it. If you rotate 180 degrees very quickly from one landscape orientation to the opposite landscape orientation, the gap disappears and looks good.
The method below refers to a custom view controller and is called in willAnimateRotationToInterfaceOrientation:duration: (obviously for handling rotation events) and viewDidAppear: (for processing when viewing a view from a previous view controller in the navigation stack).
- (void)cueAnimationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation fromViewDidAppear:(BOOL) fromViewDidAppear {
Many thanks to everyone who can take the time to look at this.
source share