Xcode Use Image On UINavigationbar

You can set an image to the UINavigationbar in Xcode for iPhone like this:

UINavigationBar *navBar = [[self navigationController] navigationBar];
UIImage *backgroundImage = [UIImage imageNamed:@"nav-bar-background-normal"];
[navBar setBackgroundImage:backgroundImage forBarMetrics:UIBarMetricsDefault];

Works from iOS 5 and up.

Posted in Mac, Tips and Tricks Tagged with: , ,