Skip to content

A UINavigationBar subclass for strong colored navigation bars on iOS 7.

License

Notifications You must be signed in to change notification settings

CloudMetal/AZColoredNavigationBar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AZColoredNavigationBar

A drop–in UINavigationBar subclass which allows for strong coloured navigation bars on iOS 7.

Usage

Use with UINavigationController's initWithNavigationBarClass:toolbarClass: method:

UINavigationController *navigationController = [[UINavigationController alloc] initWithNavigationBarClass:[AZColoredNavigationBar class] toolbarClass:[UIToolbar class]];

// If you need to set a rootViewController too, then set the navigationController's viewControllers.
navigationController.viewControllers = @[ rootViewController ];

Then either set the barTintColor using UIAppearance (applied globally):

[[UINavigationBar appearance] setBarTintColor:[UIColor blueColor]];

Or if you want to change the colour dynamically:

navigationBar.barTintColor = [UIColor blueColor];

Acknowledgements

Thanks to @steventroughtonsmith for the original help as seen in this gist. Forked from @aprato's modification here.

About

A UINavigationBar subclass for strong colored navigation bars on iOS 7.

Resources

License

Stars

Watchers

Forks

Packages

No packages published