I have the following code in viewWillAppear in my view controller.
- (void) viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
UIImage *image = [UIImage imageNamed:@"navbar.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
[self.navigationController.navigationBar addSubview:imageView];
}
How do I clear the navigation bar background image that is already there before adding a new nav bar image as in the code above?
Also, how can I set a different navigation bar background image for each different controller the most efficient way possible? thanks!