Skip to content

Instantly share code, notes, and snippets.

@kernel1983
Created October 27, 2010 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kernel1983/648397 to your computer and use it in GitHub Desktop.
Save kernel1983/648397 to your computer and use it in GitHub Desktop.
custom NavigationBar bg
//.h file
@interface NavigationBar : UINavigationBar {
}
- (void)drawRect:(CGRect)rect;
@end
//.m file
@implementation NavigationBar
- (void)drawRect:(CGRect)rect
{
UIImage *img = [UIImage imageNamed: @"title_bar_320x44@2x.png"];
[img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
self.tintColor = RGBACOLOR(150, 0, 0, 0.1);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment