I have a view controller that flips in to provide basic app info. When this view initially loads, it slides under the status bar, shifting the entire view up 20 pixels. The xib file is built with the status bar in place - but the view is shifter up, and has 20 blank pixels at the bottom.
But if I transition back to the main part of the app, and the go to this view again later, the view shifts down 20 pixels, and then looks as it should - even though I've taken no action that would cause the view to shift. The code below may not shed any light on this issue - but any idea what's going on here?
if (self.infoViewController == nil) {
infoViewController =
[[InfoViewController alloc ] initWithNibName:@"InfoViewController" bundle:nil];
}
[UIView transitionFromView:self.view toView:infoViewController.view duration:1.0 opt开发者_如何学Cions:UIViewAnimationOptionTransitionFlipFromLeft completion:nil];
In this context, I think you may have written code for hiding the status bar in the infoViewController. Or else while creating the infoViewController nib file, unexpectedly you may set the statausbar to None.
Change the status bar value.
So once check those, your problem will be solved.
精彩评论