I have an ABPeoplePickerNavigationController
as below
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
I need to disable some of the contacts being selected from the ABPeoplePickerNavigationController's list view.
While browsing, got some idea like this
// Predicate to enable only the contacts having a mail id atleast.
picker.predicateForEnablingPerson = [NSPredicate predicateWithFormat:@"emailAddresses.@count > 0"];
So I implemented a predicate like below to exclude the selection of contact with the first name I have.
NSString *firstName = @"Kate";
// Predicate to disable selection of the contacts with the first name given.
picker.predicateForEnablingPerson = [NSPredicate predicateWithFormat:@"firstName != %@",firstName];
Unfortunately its not working.