Skip to content

wy676579037/DSTransparentNavigationBar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSTransparentNavigationBar

UINavigationBar that allows to set a transparency colors.

zero alpha

0.5 alpha

gradient alpha

Usage

Interface Builder

Select the NavigationBar from the Navigation Controller in the Interface Builder. Then, in Utilities -> Identity Inspector select DSNavigationBar as the Class.

IB screenshot

Programatically

In the AppDelegate import the header file and set the navigationBar class to DSNavigationBar

#import "DSNavigationBar.h"

UINavigationController *navigationController = [[UINavigationController alloc] initWithNavigationBarClass:[DSNavigationBar class] toolbarClass:nil];

// create a color and set it to the DSNavigationBar appearance
UIColor * color = [UIColor colorWithRed:(190/255.0) green:(218/255.0) blue:(218/255) alpha:0.5f];
[[DSNavigationBar appearance] setNavigationBarWithColor:color];

// creating a fade out effect
/*
UIColor *topColor = [UIColor colorWithRed:(190/255.0) green:(218/255.0) blue:(218/255) alpha:1.0f];
UIColor *bottomColor = [UIColor colorWithRed:(190/255.0) green:(218/255.0) blue:(218/255) alpha:0];
[[DSNavigationBar appearance] setNavigationBarWithColors:@[topColor,bottomColor]];
*/

License

Under the MIT license. More info on the LICENSE file.

TODO

  • Swift implementation
  • iOS 7 support.

About

Transparent NavigationBar. Objective-C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%