In my AppDelegate I use UIAppearance to set my own NavigationBar with this code :
[[UINavigationBar appearance] setTintColor:[UIColor blackColor]];
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"nav5.png"] forBarMetrics:UIBarMetricsDefault];
But some views of my application don't need it. How can I get rid of it so I may only use IB in concerned views ?
You don't need to use the proxy. Just get the actual navigationBar, which should look different and set the colors directly on it.
[navigationBarInstance setTintColor:[UIColor blackColor]];
[navigationBarInstance setBackgroundImage:[UIImage imageNamed:@"nav5.png"] forBarMetrics:UIBarMetricsDefault];
You can also just set both values to nil
, where you want the standard styles again. (tested by Ben Clayton
).
[navigationBarInstance setTintColor:nil];
[navigationBarInstance setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With