abpeoplepickerview

predicateWithBlock as the predicate for ABPeoplePicker.predicateForEnablingPerson causes exception

大兔子大兔子 提交于 2020-02-24 09:51:32
问题 iOS8 introduced a new scheme for configuring ABPeoplePicker using NSPredicates. I need more than the a basic predicate for which people to enable so I tried using predicateWithBlock like so: - (NSPredicate *)predicateForEnablingPerson { return [NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) { return TRUE; // Just pass back true until we figure out why it's crashing }]; } There's nothing in the scant documentation about this not being supported. Anyone know

predicateWithBlock as the predicate for ABPeoplePicker.predicateForEnablingPerson causes exception

送分小仙女□ 提交于 2020-02-24 09:50:12
问题 iOS8 introduced a new scheme for configuring ABPeoplePicker using NSPredicates. I need more than the a basic predicate for which people to enable so I tried using predicateWithBlock like so: - (NSPredicate *)predicateForEnablingPerson { return [NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) { return TRUE; // Just pass back true until we figure out why it's crashing }]; } There's nothing in the scant documentation about this not being supported. Anyone know

ABPeoplePickerNavigationController customisation

女生的网名这么多〃 提交于 2020-01-03 00:27:53
问题 I want to use ABPeoplePickerNavigationController but I want to customise the view. I want to have an accessory image by some of the contacts, and I want to sort them in a different way than the default one. Is there a way to do it? Or do I have to create my own UITableViewController ? 回答1: You'll have to create your own table view if you want to customize the appearance of the contacts in this manner. For example, you can extract the contacts using: - (void)loadContacts {

Memory leak with ABPeoplePickerNavigationController?

*爱你&永不变心* 提交于 2019-12-31 02:14:11
问题 I'm using this code to display the contacts in an app. - (IBAction) selectContact:(id)sender { ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init]; picker.peoplePickerDelegate = self; NSArray *displayedItems = [NSArray arrayWithObjects:[NSNumber numberWithInt:kABPersonAddressProperty], nil]; picker.displayedProperties = displayedItems; [self presentModalViewController:picker animated:YES]; [picker release]; } and there is a memory leak, according to

People Picker with ios 7, and ios 8 [duplicate]

∥☆過路亽.° 提交于 2019-12-21 21:32:00
问题 This question already has answers here : ABPeoplePickerNavigationController changes with iOS8? (3 answers) Closed 5 years ago . I have people picker working on ios 7, and I'm trying to add compatibility for ios 8. I've added both methods into one but I get an error that says expected identifier or '(' on the opening bracket before NSString *contactName. Any suggestions would be great! - (void)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker didSelectPerson:

People Picker with ios 7, and ios 8 [duplicate]

北慕城南 提交于 2019-12-21 21:26:16
问题 This question already has answers here : ABPeoplePickerNavigationController changes with iOS8? (3 answers) Closed 5 years ago . I have people picker working on ios 7, and I'm trying to add compatibility for ios 8. I've added both methods into one but I get an error that says expected identifier or '(' on the opening bracket before NSString *contactName. Any suggestions would be great! - (void)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker didSelectPerson:

iOS Getting selected contacts' email address in array

社会主义新天地 提交于 2019-12-21 21:25:57
问题 What I'm trying to do is show the people picker to the user, make him select all the contacts he wants, and finally get all those contacts' email addresses in an array. The best would be showing only contacts with email to the user. Until now the only thing I've been able to do is presenting the people picker with this code: ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init]; picker.peoplePickerDelegate = self; [self presentModalViewController

How Do I Obtain A User Selected Email Address From ABPeoplePicker?

╄→尐↘猪︶ㄣ 提交于 2019-12-20 07:39:58
问题 Someone else here on Stackoverflow posted a way to obtain a user selected phone number from the contacts list. Could be done for email addresses and if so, how do I do it? Here is the code: - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier { if (property == kABPersonPhoneProperty) { ABMultiValueRef multiPhones =

Crash in ABPeoplePicker when called from another modal viewcontroller and both dismissed

淺唱寂寞╮ 提交于 2019-12-20 04:54:15
问题 (Note: I filed this question before in the context of my project, but I've now recreated the crash in a test project. Any help in telling me what I'm doing wrong would be appreciated.) The crash occurs when calling ABPeoplePicker from another modal viewcontroller. Specifically, the main window has a NavController, which loads myVC. myVC then loads a modal NavController containing my controller, which then calls ABPeoplePicker. In this demo program, no user intervention is necessary until

Crash in ABPeoplePicker when called from another modal viewcontroller and both dismissed

谁都会走 提交于 2019-12-20 04:53:49
问题 (Note: I filed this question before in the context of my project, but I've now recreated the crash in a test project. Any help in telling me what I'm doing wrong would be appreciated.) The crash occurs when calling ABPeoplePicker from another modal viewcontroller. Specifically, the main window has a NavController, which loads myVC. myVC then loads a modal NavController containing my controller, which then calls ABPeoplePicker. In this demo program, no user intervention is necessary until