Wednesday, 10 August 2011

Use Image for UINavigationBar in iPhone/iPad

 In .m file before implement  use this code
 For example this is "RootViewController.m"
 
@implementation UINavigationBar (CustomImage)

- (void)drawRect:(CGRect)rect {
    UIImage *image = [UIImage imageNamed: @"imageName.png"];
    [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}

@end

@implementation RootViewController

No comments:

Post a Comment