#ifdef __IPHONE_7_0 // iOS6 and later
# define UITextAttributeFont NSFontAttributeName
# define UITextAttributeTextColor NSForegroundColorAttributeName
#endif
// APP风格设计
[[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], UITextAttributeTextColor,
[UIFont boldSystemFontOfSize: 18.0f], UITextAttributeFont,
nil]];
[[UINavigationBar appearance] setTintColor: [UIColor whiteColor]];
[[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setBackgroundColor: STYLIST_APP_COLOR];
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
[[UINavigationBar appearance] setBarStyle: UIBarStyleDefault];
[[UINavigationBar appearance] setBarTintColor: STYLIST_APP_COLOR];
if([UIDevice currentDevice].systemVersion.floatValue >= 8.0) {
[[UINavigationBar appearance] setTranslucent:NO];
}
// 修好状态栏文字颜色
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
网友评论