How to change ABPeoplePickerNavigationController backButton color?

433 views Asked by At

I use ABPeoplePickerNavigationController to get all contacts. I change the tintColor with [[UIBarButtonItem appearanceWhenContainedIn:[ABPeoplePickerNavigationController class], nil] setTintColor:[UIColor whiteColor]];, but when it push, the backItem <Contacts is still blue.

I tried this

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

and before push

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

it didn't work. How to change it?

1

There are 1 answers

2
Abhishek Sharma On

try with following 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];
}