I made UIViewController
which have navigationController
as parent (connected in storyboard),
and I want to apply picture of navigationBar for statusBar background.
but it seems that statusBar can't be state like "Translucent",
I tried to set
- (void)viewWillAppear:(BOOL)animated {
[self.navigationController.navigationBar setBackgroundImage:[UIImage
imageNamed:@"barTop.png"] forBarPosition:UIBarPositionTopAttached
barMetrics:UIBarMetricsDefault];
[self setNeedsStatusBarAppearanceUpdate];
....
}
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}
in UIViewController
.
But backgrounds of navigation and status Bar have been separated.
I try both to make plist file as "View controller-based status bar appearance" YES and NO. but still I can't configure statusBar from viewController. I couldn't find same problem in this bulletin board .
does anyone knows solution??or how to debug?
thank you for reading.
(9/3 added: I want to make backgrounds together for navigationBar and statusBar.
And under the simple condition like that there are one navigationController and one ViewController, both bars can make their backgrounds together (default).
Now I met the something wrong when I make tabBarController indicate to multiple navigationController by storyboard.)