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

spookd/AZColoredBars

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AZColoredNavigationBar

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

Usage

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;

Storyboards

Simply set the control class to AZColoredNavigationBar or AZColoredToolbar.

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

Languages

  • Objective-C 89.5%
  • Ruby 10.5%