第一步:
//在info.plist中添加一个字段:view controller -base status bar 设置为NO;
//导航颜色
[[UINavigationBar appearance] setBarTintColor:[UIColor XXXX]];
[[UITableViewCell appearance] setBackgroundColor:[UIColor XXXX]];
//设置状态栏(信号区)白色
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
//默认带有一定透明效果,可以使用以下方法去除系统效果
[navigationController.navigationBar setTranslucent:NO];
//更改导航标题字体大小与颜色要在第一级页面设置 如下
// 设置导航默认标题的颜色及字体大小
self.navigationController.navigationBar.titleTextAttributes = @{UITextAttributeTextColor: [UIColor whiteColor], UITextAttributeFont:[UIFont boldSystemFontOfSize:18]};
第二步:
//UIImageRenderingModeAlwaysOriginal 让图片表现的模式为图片的原始样式 用于去掉系统添加的颜色
if ([[UIDevice currentDevice] systemVersion].floatValue >= 8.0) {
self.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"title" image:[[UIImage imageNamed:@"Image.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:@"ImageS.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
}else{
self.tabBarController.tabBarItem.title = @"title";
if ([[UIDevice currentDevice] systemVersion].floatValue >= 7.0) {
[self.tabBarController.tabBarItem setFinishedSelectedImage:[[UIImage imageNamed:@"Image.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] withFinishedUnselectedImage:[[UIImage imageNamed:@"ImageS.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
}else{
[self.tabBarController.tabBarItem setFinishedSelectedImage:[UIImage imageNamed:@"Image.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"ImageS.png"]];
}
}
//tabbar颜色 用于更改字体颜色
[self.tabBarController.tabBar setTintColor:[UIColor XXXX]];