iPhone Objective-c - Custom UINavigationBar Background Image

/ Published in: Objective C
Save to your folder(s)

@drag the UINavigationBar to you Xib
@and paste the code to your App Delegate.h

Copy this code and paste it in your HTML
  1. @implementation UINavigationBar(Background)
  3. -(void)drawRect:(CGRect)rect{
  4. UIImage *navBgImage = [UIImage imageNamed:@"nav_bg.jpg"];
  5. [navBgImage drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
  7. }
  8. @end

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.