Last active
December 26, 2015 13:29
-
-
Save jsai/7158970 to your computer and use it in GitHub Desktop.
Navigation Bar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define RGBCOLOR(R,G,B) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:1.0] | |
| #define NAV_TOOLBAR_BG_COLOR RGBCOLOR(45.0,45.0,45.0) | |
| #define NAV_TINT_COLOR RGBCOLOR(0.0, 119.0, 181.0) | |
| - (void)setupNavigationBar { | |
| UINavigationBar *navigationBar = self.navigationController.navigationBar; | |
| navigationBar.barStyle = UIBarStyleBlackOpaque; | |
| navigationBar.translucent = NO; | |
| navigationBar.backgroundColor = NAV_TOOLBAR_BG_COLOR; | |
| if (LI_IS_IOS7_RUNTIME) { | |
| [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent; | |
| navigationBar.barTintColor = NAV_TOOLBAR_BG_COLOR; | |
| navigationBar.tintColor = NAV_TINT_COLOR; | |
| } | |
| else { | |
| [navigationBar setBackgroundImage:[UIImage imageNamed:@"nav_texture_top.png"] | |
| forBarMetrics:UIBarMetricsDefault]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment