Ios ABPeoplePickerNavigationController搜索栏的颜色,不会更改

Ios ABPeoplePickerNavigationController搜索栏的颜色,不会更改,ios,objective-c,contacts,abpersonviewcontroller,Ios,Objective C,Contacts,Abpersonviewcontroller,当选择联系人时,我正在尝试将搜索栏的颜色更改为橙色,并将搜索栏的着色颜色更改为白色 不管我一直在尝试什么,什么都不会改变,就像这个后退按钮不是白色的一样 在AppDelegate中: [[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTintColor:[UIColor whiteColor]]; [[UINavigationBar appearanceWhenContainedIn:[UIN

当选择联系人时,我正在尝试将搜索栏的颜色更改为橙色,并将搜索栏的着色颜色更改为白色

不管我一直在尝试什么,什么都不会改变,就像这个后退按钮不是白色的一样

在AppDelegate中:

[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearanceWhenContainedIn:[UINavigationController class], nil] setBarTintColor:OrangeOfficialColor];

[[UINavigationBar appearance] setBarTintColor:OrangeOfficialColor];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
弹出视图时:

ABPeoplePickerNavigationController *contactsPicker = [[ABPeoplePickerNavigationController alloc] init];
    contactsPicker.peoplePickerDelegate = self;
    contactsPicker.displayedProperties = @[[NSNumber numberWithInt:kABPersonPhoneProperty]];

    [contactsPicker.searchDisplayController.searchBar setBarTintColor:OrangeOfficialColor];
    [contactsPicker.searchDisplayController.searchBar setTintColor:[UIColor whiteColor]];

    [self presentViewController:contactsPicker animated:YES completion:nil];
视图正常:

视图不正常:

视图不正常:


当我开始使用Xcode 6 iOS 8 SDK和iOS 7应用程序时,我也遇到了同样的问题。这是我的解决方案:

[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue" size:16.0f], NSForegroundColorAttributeName : [UIColor blueColor]} forState:UIControlStateNormal];

我的回答解决了你的问题吗?