升级到 iOS9 后,我刚刚注意到我的应用程序出现了不同的行为。我有一个显示手机设备联系人的视图。
我的代码如下:
if (... == YES)
{
ABRecordSetValue(aContact, kABPersonEmailProperty, email, &anError);
if (anError == NULL)
{
ABUnknownPersonViewController *picker = [[ABUnknownPersonViewController alloc] init];
picker.unknownPersonViewDelegate = self;
picker.displayedPerson = aContact;
picker.allowsAddingToAddressBook = YES;
picker.allowsActions = YES;
picker.alternateName = @"John Appleseed";
picker.title = @"John Appleseed";
picker.message = @"Company, Inc";
[self.navigationController pushViewController:picker animated:YES];
}
然后我使用委托做出一些决定
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person
property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
{
//make decisions
return YES or NO;
}
用户点击电话号码。
在 IOS8 >> 代码到达 shouldContinueAfterSelectingPerson 然后出现本机拨号器
在 IOS9 >> 本地拨号器出现在代码到达 shouldContinueAfterSelectingPerson 之前。
有什么办法解决吗?