since I upgraded to xcode 4.2 and iOS 5, the following code has no effect:
@implementation UINavigationBar (CustomNavBarBG) -(void)drawRect:(CGRect)rect{ UIImage *image = [UIImage imageNamed:@"navbar.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; self.tintColor = [UIColor colorWithRed:124/255.0 green:177/255.0 blue:55/255.0 alpha:1.0]; } @end @implementation MyAppDelegate //....
To do this, apply the background image and color to the navigation bar. But since the update, I get the blue color by default. I use the tr20 structure in my project.
Any idea why this is not working? How to set a background image for all navigation panels in one place, and not on each controller?
source share