I have a custom navigation bar showing a logo with an image and the status bar appears white. I'd like to be able to set the status bar color to match the greyish background of the logo.
http://i.imgur.com/wn0oOX5.png
When a cell is selected, I have the navigation bar going back to default and the status bar matches the navigation bar.
http://i.imgur.com/btQOvXn.png
LogoNavBar.m:
- (CGSize)sizeThatFits:(CGSize)size {
CGSize newSize = CGSizeMake(self.frame.size.width, 90);
return newSize;
}
- (void)drawRect:(CGRect)rect
{
UIImage *image = [UIImage imageNamed:@"logo.png"];
[image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
MasterViewController.m:
- (void)viewDidLoad
{
[self.navigationController setValue:[[LogoNavBar alloc]init] forKeyPath:@"navigationBar"];
}
DetailViewController.m:
- (void)viewDidLoad
{
[self.navigationController setValue:[[UINavigationBar alloc]init] forKeyPath:@"navigationBar"];
}
I've tried:
[[UINavigationBar appearance] setBarTintColor:[UIColor *colorhere*]];
in the app delegate and elsewhere but to no luck.