我想在表委託方法(DidSelectRowAtIndex)上打開ABPersonViewController。但是當我在表格視圖中點擊我的一個聯繫人時,它顯示「obj msg send」。幫我 這裏是我的代碼:donot open ABPersonViewController
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Fetch the address book 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]; personController.addressBook = addressBook; personController.personViewDelegate = self; personController.displayedPerson = person; personController.allowsEditing = YES; //navigationController = [[UINavigationController alloc] init] ; [self presentModalViewController:personController animated:YES]; //[self.navigationController pushViewController:personController animated:YES]; [personController release]; } else { // Show an alert if "KETAN" is not in Contacts UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Could not find naina in the Contacts application" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:nil]; [alert show]; [alert release]; } [people release]; }
你想實現什麼?你想獲得聯繫人的信息嗎? – 2011-06-03 07:36:20
@marvin:當我在可編輯模式下選擇聯繫人中的任何名稱時,我需要打開ABPersonViewController。 – user720235 2011-06-03 09:57:07