Having some problems with customizing the UINavigationController. The size change is working, but the (1px*60px) image is not working. The code is located in the MasterViewController.
Any ideas?
@implementation UINavigationBar (custom)
- (CGSize)sizeThatFits:(CGSize)size {
CGSize newSize = CGSizeMake(self.frame.size.width,60);
return newSize;
}
- (void)drawRect:(CGRect)rect {
UIImage *image = [UIImage imageNamed: @"navimg.png"];
[image drawAsPatternInRect:CGRectMake(0, 0,self.frame.size.width, self.frame.size.height)];
}
@end
From the documentation: