我在我的应用程序中显示地址簿,并希望通过在 iOS 设备中打开 native 电话应用程序的编辑 View 让用户编辑他/她的号码。我搜索了它,但没有找到任何答案。有什么办法可以进入编辑页面吗?如果是,如何?
最佳答案
如果您使用的是 AddressBook Framework,那么您可以使用 ABPersonViewController
您可以设置allowsEditing
属性设置为 YES,以便您可以编辑联系人。
FYI: Adressbook Framework is deprecated from iOS9
如果您使用的是新的联系人框架,那么您可以使用
CNContactViewController
- (void)displayContactInfoWithEditing: (id)sender {
ABPersonViewController *personController = [[ABPersonViewController alloc] init];
personController.displayedPerson = yourABPersonRefHere;
personController.addressBook = yourABAddressBookRefHere;
personController.allowsEditing = YES;
personController.personViewDelegate = self;
[[self navigationController] pushViewController: personController animated: YES];
}
引用文献:ABPersonViewController , CNContactViewController
关于ios - 从应用程序转到 native 编辑联系人,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33717925/