Hello. I've looking around for a way to change the background image of my NavigationBar and control the appearance of my NavigationBar as the user navigates the app. I've been looking around and it appears the accepted approach for changing the background image is this...
@implementation UINavigationBar (UINavigationBarCategory)
- (void)drawRect:(CGRect)rect {
UIImage *image = [UIImage imageNamed: @"navbar.png"];
[image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end
However, that changes the appearance of the NavigationBar throughout the whole app. How can I change the background image of the NavBar as the user navigates from one view to the next?
Thanks in advance for your help!