I set the header in my CustomTabBarViewController
@implementation UINavigationBar (UINavigationBarCategory)
- (void)drawRect:(CGRect)rect {
CGContextRef context=UIGraphicsGetCurrentContext();
CGContextTranslateCTM(context, 0.0, self.bounds.size.height);
CGContextScaleCTM(context, 1.0, -1.0);
CGContextDrawImage(context, self.bounds , [UIImage imageNamed:@"capiton_haut.png"].CGImage);
if(UIDeviceOrientationIsLandscape([[UIDevice currentDevice] orientation]))
{
CGContextDrawImage(context, CGRectMake(155, 5, 170, 37), [UIImage imageNamed:@"logo_pages.png"].CGImage);
}
else {
CGContextDrawImage(context, CGRectMake(75, 5, 170, 37), [UIImage imageNamed:@"logo_pages.png"].CGImage);
}
}
@end
@implementation CustomTabBarViewController.....
When I tested I see the header. After I d arhive and send ipa to testers they don t have bugs but they cannot see header . Is black .
Thanks,
Raluca
Is the image inside the IPA? Seems like you forgot it or the name is different from “capiton_haut.png”.
EDIT:
Instead of using category create a UINavigationBar subclass to override the
drawRect:method. This should solve your problem, and work on iOS 5.