A drop–in UINavigationBar
and UIToolbar
subclass which allows for strong coloured navigation bars on iOS 7.
Use with UINavigationController's initWithNavigationBarClass:toolbarClass: method:
[[UINavigationController alloc] initWithNavigationBarClass:[AZColoredNavigationBar class]
toolbarClass:[AZColoredToolbar class]];
You can then set their respective tint colors directly, or by using their UIAppearance
class - e.g.:
[[UIToolbar appearance] setBarTintColor:UIColor.blueColor];
[[UINavigationBar appearance] setBarTintColor:UIColor.blueColor];
To change the colors intensity, use the static intensity
property of the AZColoredBars
object:
#import "AZColoredBars.h"
// ...
AZColoredBars.intensity = .65f;
Simply set the control class to AZColoredNavigationBar
or AZColoredToolbar
.
Thanks to @steventroughtonsmith for the original help as seen in this gist. Forked from @aprato's modification here.