hi,
I am using this code to change the Navigation Controller's nav bar :
Code:
// custom nav bar background
@implementation UINavigationBar (UINavigationBarCategory)
- (void)drawRect:(CGRect)rect {
UIDeviceOrientation o = [[UIDevice currentDevice] orientation];
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGContextTranslateCTM(context, 0, self.frame.size.height);
CGContextScaleCTM(context, 1.0, -1.0);
// Drawing code
if ( (o == UIDeviceOrientationLandscapeLeft) || (o == UIDeviceOrientationLandscapeRight)) {
UIImage *img = [UIImage imageNamed: @"v2-header-landscape.png"];
CGContextDrawImage(context, CGRectMake(0, 0, 480, self.frame.size.height), img.CGImage);
}
else {
UIImage *img = [UIImage imageNamed: @"v2-header.png"];
CGContextDrawImage(context, CGRectMake(0, 0, 320, self.frame.size.height), img.CGImage);
}
CGContextRestoreGState(context);
}
@end
This code changes the background of the nav bar in every pushed controller, including the Movie Player.
Any idea how to prevent this ?