如何更改ABPeoplePickerNavigationController的backButton颜色?

时间:2015-06-25 09:15:55

标签: ios abpersonviewcontroller

我使用ABPeoplePickerNavigationController获取所有联系人。我使用[[UIBarButtonItem appearanceWhenContainedIn:[ABPeoplePickerNavigationController class], nil] setTintColor:[UIColor whiteColor]];更改tintColor,但推送时,backItem <Contacts仍为蓝色。

我试过这个

`[[UIBarButtonItem appearanceWhenContainedIn:[ABPeoplePickerNavigationController class], nil] setTintColor:[UIColor whiteColor]];`  
_picker.topViewController.navigationController.navigationBar.tintColor = [UIColor whiteColor];

之前推送

[[UIBarButtonItem appearanceWhenContainedIn:[ABPersonViewController class], nil] setTintColor:[UIColor whiteColor]];

它不起作用。 如何改变?

1 个答案:

答案 0 :(得分:0)

尝试关注code ..

- (IBAction)btnopencontact {

    [[UINavigationBar appearanceWhenContainedIn:[ABPeoplePickerNavigationController class], nil] setBarTintColor:[UIColor redColor]];
    ABPeoplePickerNavigationController *objPeoplePicker = [[ABPeoplePickerNavigationController alloc] init];
    [objPeoplePicker setPeoplePickerDelegate:self];
    [self presentViewController:objPeoplePicker animated:YES completion:nil];
}