Reputation: 961
How we set image in navigation bar in iPhone?
self.navigationController.navigationBar.tintColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"banner.png"]];`
Upvotes: 0
Views: 448
Reputation: 2385
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.
Upvotes: 1
Reputation: 15628
UIImage *image = [UIImage imageNamed:@"yourImage.png"];
self.navigationItem.titleView = [[[UIImageView alloc] initWithImage:image] autorelease];
This puts the image in your navigation bar title.
Upvotes: 0