3

由于 iOS 9 在使用 addressbookui 框架在我的应用程序中添加新联系人时,我无法从相机添加照片,尽管我可以从照片库添加照片。这在 iOS 8 及以下版本中按预期工作。我什至使用了contactsUI API并尝试从相机添加照片,但即使这样也不起作用。

//iOS 9
CNContact *contact = [[CNContact alloc] init];
    CNContactViewController *contactVC = [CNContactViewController viewControllerForNewContact:contact];
    [self presentViewController:contactVC animated:YES completion:nil];

//iOS 8
ABNewPersonViewController *unknownPersonViewController = [[ABNewPersonViewController alloc] init];
[self presentViewController:unknownPersonViewController animated:YES completion:nil];
4

0 回答 0