Skip to content

Instantly share code, notes, and snippets.

@keicoder
Created February 14, 2014 01:51
Show Gist options
  • Select an option

  • Save keicoder/8994422 to your computer and use it in GitHub Desktop.

Select an option

Save keicoder/8994422 to your computer and use it in GitHub Desktop.
objective-c : styling navigation bar and status bar on the iOS7
//styling navigation bar and status bar on the iOS7
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// style the navigation bar
UIColor* navColor = [UIColor colorWithRed:0.97f green:0.37f blue:0.38f alpha:1.0f];
[[UINavigationBar appearance] setBarTintColor:navColor];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]}];
// make the status bar white
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment