I am having troubles after updating to Xcode 4.2. Before I used the following codes for making custom navigation bar, but when i use iPhone 5.0 simulator, it fails whereas in iPhone 4.2 simulator it was ok.
May I know what is the problem and how can i fix this?
Many thanks
@implementation UINavigationBar (UINavigationBarCustomDraw)
- (void) drawRect:(CGRect)rect {
[self setTintColor:[UIColor colorWithRed:0.4f
green: 0.0f
blue:0.4f
alpha:1]];
if ([self.topItem.title length] > 0 && ![self.topItem.title isEqualToString:@""])
{
[[UIImage imageNamed:@"purple.jpg"] drawInRect:rect];
}
}
@end