合并现有联系人的联系方式

时间:2012-03-27 08:50:49

标签: ios cocoa-touch abpersonviewcontroller

我试图在addressBook中使用ABPeoplePickerNavigationController选择一个用户,然后在委托方法中选择一个用户

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person;

我希望添加到ABRecordRef,然后使用ABPersonViewController修改/保存此记录。

我的问题是将navigationController附加到ABPersonViewController的问题。欢迎任何帮助。

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person {


    ABPersonViewController *personView = [ABPersonViewController new];

    [self populate:person withData:self.personData];
    personView.displayedPerson =  person;

    personView.personViewDelegate = self;
    personView.allowsEditing = YES;

    [peoplePicker.navigationController pushViewController:personView animated:YES];

//    [self dismissPicker:peoplePicker];
    return YES;

}

1 个答案:

答案 0 :(得分:0)

你能解决这个问题吗? Apple QuickContacts示例从单独的按钮提供ABPeoplepickerNavigationController和ABPersonViewController,而不是将它们组合在一起,这表明它们不能一起工作......