I am using this code to change the background of my UINavigationBar but it is not showing in the iPhone, but working fine in the iPhone simulator.
self.navigationController.navigationBar.layer.contents = (id)[UIImage imageNamed:@"Blue Bar.png"].CGImage;
Try This