Reputation: 47354
I want my navbars to use black transparent appearance. In my non-storyboard apps, i could put this code in the AppDidFinishLoadingWithOptions
:
[[UINavigationBar appearance] setTintColor:[AppColors navBarColor]];
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackTranslucent];
[[UINavigationBar appearance] setAlpha:0.7];
[[[UITableView appearance] backgroundView]setBackgroundColor:[AppColors tableViewBackgroundColor]];
[[[UITableViewCell appearance] backgroundView]setBackgroundColor:[AppColors tableViewCellBackgroundColor]];
Where would this code go if I'm using a storyboard? It appears that my controllers are loaded before the app finishes launching
Thank you!
Upvotes: 0
Views: 519
Reputation: 29880
Try putting it in the viewDidLoad
method in your applications root view controller.
Upvotes: 0
Reputation: 30846
This will continue to work with storyboards. The appearance
class method returns a proxy object that defines style information for all created instances of that class.
Upvotes: 1