我用重载方法更改了UINavigationBar
背景图像
@implementation UINavigationBar (Background)
-(void) drawRect:(CGRect)rect
{
UIImage *image = [UIImage imageNamed:@"Header.png"];
[image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end
但是在一些 UIViewController 中我需要删除这个背景图像。我该怎么做?
最佳答案
您可以查看 this blog post from Sebastian Celis 。它完全解决了您面临的问题。
也许还可以检查 this .
关于iphone - 将 UINavigationBar 背景图像更改为默认 - iOS 4.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10163047/