转:http://blog.csdn.net/u013127850/article/details/52909463
// 更改picker的导航条颜色 及item的tintcolor
if ([picker.navigationBar respondsToSelector:@selector(setBarTintColor:)]) {
[picker.navigationBar setBarTintColor:[UIColor blackColor]];
[picker.navigationBar setTranslucent:NO];
[picker.navigationBar setTintColor:[UIColor whiteColor]];
} else {
[picker.navigationBar setBackgroundColor:[UIColorblackColor]];
}
// 更改titieview的字体颜色
NSMutableDictionary *attrs = [NSMutableDictionary dictionary]; attrs[NSForegroundColorAttributeName] = [UIColor whiteColor]; [picker.navigationBar setTitleTextAttributes:attrs]; [self showDetailViewController:picker sender:nil];
网友评论