From a14cc19fb021a74be4c2d756eab040c95b3a487e Mon Sep 17 00:00:00 2001 From: matt handler Date: Fri, 22 Apr 2011 17:31:11 -0400 Subject: just some small cleanup, moved the navbar image thing to main app delegate, --- Classes/PicCastAppDelegate.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Classes/PicCastAppDelegate.m') diff --git a/Classes/PicCastAppDelegate.m b/Classes/PicCastAppDelegate.m index baa06df..ab242ec 100644 --- a/Classes/PicCastAppDelegate.m +++ b/Classes/PicCastAppDelegate.m @@ -10,6 +10,21 @@ #import +@implementation UINavigationBar (CustomImage) +- (void)drawRect:(CGRect)rect { + //NSLog(@"titlebar: %@", self.barStyle); + if (self.barStyle == UIBarStyleDefault) { + UIImage *image = [UIImage imageNamed: @"titleBarBackground.png"]; + [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; + } + else { + UIImage *image = [UIImage imageNamed: @"titleBarBackgroundBlack.png"]; + [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; + } + //[super drawRect:rect]; +} +@end + @implementation PicCastAppDelegate @synthesize window; -- cgit v1.2.3