ABPersonViewController
編集可能モードで開いていません。ブレークポイントを使用すると、コントロールがデリゲートメソッドに到達しません。問題はどこだ?これが私のコードです:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //名簿を取得します if((people!= nil)&& [people count]) {ABAddressBookRef addressBook = ABAddressBookCreate(); // ABPersonViewController * personController = [[ABPersonViewController alloc] initWithNibName:@ "ABPersonViewController" bundle:nil]; ABRecordRef person =(ABRecordRef)[people objectAtIndex:indexPath.row]; ABPersonViewController * personController = [[[ABPersonViewController alloc] init] autorelease]; personController.addressBook = addressBook; personController.personViewDelegate = self; personController.displayedPerson = person; personController.allowsEditing = YES; // NavigationController = [[UINavigationController alloc] init]; [自己presentModalViewController:personControllerアニメーション:YES]; //[self.navigationController pushViewController:personControllerアニメーション:YES]; //[personControllerリリース]; } そうしないと {{ //「KETAN」が連絡先にない場合にアラートを表示します UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"エラー" メッセージ:@"連絡先アプリケーションでnainaが見つかりませんでした" デリゲート:nil cancelButtonTitle:@"キャンセル" otherButtonTitles:nil]; [アラートショー]; [アラートリリース]; } [人々が解放する]; } -(BOOL)personViewController:(ABPersonViewController *)personViewController shouldPerformDefaultActionForPerson:(ABRecordRef)person プロパティ:(ABPropertyID)プロパティ識別子:(ABMultiValueIdentifier)identifierForValue {{ NOを返します。 }