Reputation: 2094
I have a UIViewController segued to from a UITableViewController which is itself embedded in a UINavigationController.
In the Attributes pane of the Utilities inspector, I have set Top Bar to Translucent Black Navigation Bar (under Simulated Metrics).
That works all fine and dandy in the UITableViewController but my view in the UIViewController was sliding back up behind the Navigation Bar as described here so I thought I'd try to change the default for Utilities inspector > Attributes pane > Simulated Metrics > Top Bar to Black Navigation Bar.
Didn't work. It seems like I can't UN-infer any of the Simulated Metrics.
Upvotes: 1
Views: 2744
Reputation: 53181
Just to check your understanding... Simulated Metrics are just how the status bar/tab bar etc appear in Interface Builder. These don't affect the running app.
The easiest place to change your status bar type is in your target's info.plist:
To change it programmatically, just use:
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque;
To change the nav bar style
self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
Upvotes: 5