If hiding the status bar by choosing status bar style = hide during application launch
and I am customizing uinavigation bar like the following
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed: @"navbar-iphone.png"]
forBarMetrics:UIBarMetricsDefault];
and when I am getting this : the navigation bar is cut off the top.
![](https://www.manongdao.com/static/images/pcload.jpg)
and
![](https://www.manongdao.com/static/images/pcload.jpg)
Any ideas about this situation and how to fix it ?
You can try this.
during application launch. here viewController is UINavigationController.
//set status bar hidden true.
[[UIApplication sharedApplication]setStatusBarHidden:YES];
//You can set navigation bar frame to start from 0.0,0.0
self.viewController.navigationBar.frame = CGRectOffset(self.viewController.navigationBar.frame, 0.0, -20.0);
//set the image u want.
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed: @"navbar-iphone.png"]
forBarMetrics:UIBarMetricsDefault];
Or
[[UIApplication sharedApplication]setStatusBarHidden:YES];
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed: @"navbar-iphone.png"]
forBarMetrics:UIBarMetricsDefault];
[self.viewController setWantsFullScreenLayout:YES];