How we set image in navigation bar in iPhone?
self.navigationController.navigationBar.tintColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"banner.png"]];`
How we set image in navigation bar in iPhone?
self.navigationController.navigationBar.tintColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"banner.png"]];`
This won't work in iOS 5 correctly. See this answer for how to implement this in a way that works in iOS5 and previous versions. Custom nav bar styling - iOS
This is a much better way to do things and ensures your app will work in multiple versions of iOS.
UIImage *image = [UIImage imageNamed:@"yourImage.png"];
self.navigationItem.titleView = [[[UIImageView alloc] initWithImage:image] autorelease];
This puts the image in your navigation bar title.