Skip to content

Instantly share code, notes, and snippets.

@tuchangwei
Created June 13, 2015 07:55
Show Gist options
  • Save tuchangwei/fe778cd7b374e6110622 to your computer and use it in GitHub Desktop.
Save tuchangwei/fe778cd7b374e6110622 to your computer and use it in GitHub Desktop.
- (void)customAppearance {
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
[[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]}];
//[[UINavigationBar appearance]setBackgroundColor:[UIColor colorWithRed:26.0/255 green:26.0/255 blue:129.0/255 alpha:1.0]];
[[UINavigationBar appearance]setBackgroundImage:[UIImage imageNamed:@"navbar_bg"]forBarMetrics:UIBarMetricsDefault];
if([UIDevice currentDevice].systemVersion.floatValue >= 8.0) {
[[UINavigationBar appearance]setTranslucent:NO];
}
[[UINavigationBar appearance]setBarTintColor:[UIColor colorWithRed:26.0/255 green:26.0/255 blue:129.0/255 alpha:1.0]];
//UIBarButton back button arrow color
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UITabBar appearance] setBarTintColor:[UIColor colorWithRed:26.0/255 green:26.0/255 blue:129.0/255 alpha:1.0]];
[[UITabBar appearance]setTintColor:[UIColor whiteColor]];
//iOS 7 tabBar-line, how to remove it?
[[UITabBar appearance] setShadowImage:[[UIImage alloc] init]];
//[[UITabBarItem appearance] setImageInsets:UIEdgeInsetsMake(-6, 0, 6, 0)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment