Ios 通讯簿颜色已更改
我的应用程序中的导航栏有白色文本,当用户打开通讯簿时,它应该是正常颜色(蓝色文本)。在按下通讯录视图之前,我尝试更改文本颜色,但标题(组、取消)仍然为白色。我怎样才能解决这个问题?感谢您的帮助 <>编辑:中间的标题(所有联系人)都是默认的黑色。 我已经试过了Ios 通讯簿颜色已更改,ios,iphone,objective-c,cocoa-touch,Ios,Iphone,Objective C,Cocoa Touch,我的应用程序中的导航栏有白色文本,当用户打开通讯簿时,它应该是正常颜色(蓝色文本)。在按下通讯录视图之前,我尝试更改文本颜色,但标题(组、取消)仍然为白色。我怎样才能解决这个问题?感谢您的帮助 编辑:中间的标题(所有联系人)都是默认的黑色。 我已经试过了 self.navigationController.navigationBar.tintColor = [UIColor blueColor]; self.navigationItem.rightBarButtonItem.tintColor
self.navigationController.navigationBar.tintColor = [UIColor blueColor];
self.navigationItem.rightBarButtonItem.tintColor = [UIColor blueColor];
self.navigationItem.leftBarButtonItem.tintColor = [UIColor blueColor];
在推送通讯录视图之前,但这不起作用。
我也试过了
[picker.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObject:[UIColor blueColor] forKey:NSForegroundColorAttributeName]];
picker.navigationController.navigationBar.tintColor = [UIColor blueColor];
picker.navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObject:[UIColor blueColor] forKey:NSForegroundColorAttributeName];
但这些都不起作用。修复了
[[UIBarButtonItem appearance] setTintColor:nil];
也许这篇文章会有用,他们想更改那篇文章的默认颜色,但我只想要默认颜色。我没有AddressbookViewController。我使用
ABPeoplePickerNavigationController*picker=[[abpeoplepickernavigationcontrolleralloc]init]推送视图;picker.peoplePickerDelegate=self;[自我呈现视图控制器:选择器已设置动画:是完成:无]代码>ABPeoplePickerNavigationController是UINavigationController的子类。尝试picker.navigationBar.titleTextAttributes=texttributes;[picker.navigationBar setTintColor:[UIColor whiteColor]];
UINavigationController *nac = [[[UINavigationController alloc] initWithRootViewController:addBookViewController]autorelease];
NSDictionary *textAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor],NSForegroundColorAttributeName,
[UIColor whiteColor],NSBackgroundColorAttributeName,nil];
nac.navigationBar.titleTextAttributes = textAttributes;
[nac.navigationBar setTintColor:[UIColor whiteColor]];