【问题标题】:ABPersonViewController not opening in editable modePerson ViewController 未在可编辑模式下打开
【发布时间】:2011-06-03 12:04:04
【问题描述】:

ABPersonViewController 未在可编辑模式下打开。当我使用断点时,控制没有到达委托方法。问题出在哪里?这是我的代码:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // 获取通讯录 if ((people != nil) && [人数统计]) { ABAddressBookRef 地址簿 = ABAddressBookCreate(); //ABPersonViewController *personController = [[ABPersonViewController alloc] initWithNibName:@"ABPersonViewController" bundle:nil]; ABRecordRef person = (ABRecordRef)[people objectAtIndex:indexPath.row]; ABPersonViewController *personController = [[[ABPersonViewController alloc] init]autorelease]; personController.addressBook = 地址簿; personController.personViewDelegate = 自我; personController.displayedPerson = 人; personController.allowsEditing = YES; //navigationController = [[UINavigationController alloc] init] ; [自我presentModalViewController:personController动画:YES]; //[self.navigationController pushViewController:personController Animation:YES]; //[personController 释放]; } 别的 { // 如果“KETAN”不在通讯录中,则显示警报 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" 消息:@“在联系人应用程序中找不到 naina” 代表:无 cancelButtonTitle:@"取消" 其他按钮标题:无]; [警报显示]; [警报发布]; } [人民释放]; } - (BOOL)personViewController:(ABPersonViewController *)personViewController shouldPerformDefaultActionForPerson:(ABRecordRef)person 属性:(ABPropertyID)属性标识符:(ABMultiValueIdentifier)identifierForValue { 返回否; }

【问题讨论】:

    标签: ios iphone abpersonviewcontroller


    【解决方案1】:

    您在可编辑模式方面处于正确的轨道上。但是,您首先需要从导航控制器推送ABPersonViewController(请参阅documentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-07
      • 1970-01-01
      • 1970-01-01
      • 2022-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-11
      相关资源
      最近更新 更多