0
在自定義UINavigationController時遇到了一些問題。大小更改正在工作,但(1px * 60px)圖像不起作用。代碼位於MasterViewController中。UISplitViewController中的自定義UINavigationbar
任何想法?
@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