Make staus bar visible without overlapping view
I hav开发者_StackOverflowe a tab bar with two views. In the first view the iPhone status bar is hidden using [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]
. When the second view is loaded, and the status bar is made visible again using [[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES]
it overlaps the view. How do I make the status bar visible again without overlapping the second view?
Thanks
Try this code. The dot is a dash..
- (void)viewWillAppear:(BOOL)animated { // to fix the controller showing under the status bar self.view.frame = [[UIScreen mainScreen] applicationFrame]; }
精彩评论