开发者

Make staus bar visible without overlapping view

开发者 https://www.devze.com 2022-12-30 04:11 出处:网络
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

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]; }
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号