When I set the tintcolor using following code it works
self.navigationController.navigationBar.tintColor = [UIColor brownColor];
But When I try to set the tint color like - ` UIImage *navigationBarCol = [UIImage imageNamed:@"navigatorBar_color.png"];
self.navigationController.navigationBar.tintColor = [UIColor colorWithPatternImage:navigationBarCol]; ` Then it does not show the exact color and only shows a shade of black. navigationBar_color.png is a single pixel image of the color I want to set. I am using this method to set the color of table rows or other objects in my program and it works fine.
Moreover UIColor colorWithPatternImage method is supposed to return UIColor so both the approach also look similar to me. Can you please tell me then why does the second approach does not work well for navigatiorBar.