I use this line of code to change navigation bar background:
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"image.png"] forBarMetrics:UIBarMetricsDefault];
in iOS6, it works, but in iOS5, background of the status bar is changed too, as shown in this image:
how does this happen. Thanks in advance.
One more thing, I just want to change the color of UINavigationBar
, so I used this code:
[[UINavigationBar appearance] setTintColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"image.png"]]];
It works in iOS6 quite well, but does not in iOS5. What is the reason?