It is hard to change the background color of UINavigationBar along with the status bar dynamically, so I made this lib to make the job easy.
Usage
Step one:
#import "UINavigationBar+BackgroundColor.h"
Step two: update the background color wherever you want
[self.navigationController.navigationBar useBackgroundColor:[UIColor blueColor]];
Step three: in viewWillDisappear
reset the nagivation bar
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
[self.navigationController.navigationBar reset];
}
See the example for details~