Skip to content

Commit

Permalink
Merge pull request #6167 from vishalduggal/timob-17762
Browse files Browse the repository at this point in the history
[TIMOB-17762] Set up propert predicates for ABPeoplePickerNavigationController
  • Loading branch information
jonalter committed Sep 25, 2014
2 parents b3e36c1 + 08058d8 commit e126d81
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion iphone/Classes/ContactsModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,20 @@ -(void)showContacts:(id)args
cancelCallback = [[args objectForKey:@"cancel"] retain];
selectedPersonCallback = [[args objectForKey:@"selectedPerson"] retain];
selectedPropertyCallback = [[args objectForKey:@"selectedProperty"] retain];
picker = [[ABPeoplePickerNavigationController alloc] init];
[picker setPeoplePickerDelegate:self];

if ([TiUtils isIOS8OrGreater]) {
if (selectedPropertyCallback == nil) {
[picker setPredicateForSelectionOfProperty:[NSPredicate predicateWithValue:NO]];
}

if (selectedPersonCallback == nil) {
[picker setPredicateForSelectionOfPerson:[NSPredicate predicateWithValue:NO]];
}
}

animated = [TiUtils boolValue:@"animated" properties:args def:YES];

NSArray* fields = [args objectForKey:@"fields"];
Expand Down

0 comments on commit e126d81

Please sign in to comment.