2010-06-03 26 views
0
- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 

/* 
When a row is selected, set the detail view controller's detail item to the item associated with the selected row. 
*/ 
//detailViewController.detailItem = [NSString stringWithFormat:@"Row %d", indexPath.row]; 

ABPersonViewController *pvc = [[ABPersonViewController alloc] init]; 
pvc.displayedPerson = [searchArray objectAtIndex:[indexPath row]]; 
[[self navigationController] pushViewController:pvc animated:YES]; 

} 

在我的tableview中,當單擊一個單元格時,上面的代碼被執行一個新的視圖被按下,並且物品(地址,電話等)在被觸摸時不做任何事情。關於navigationController和pvc的問題

如何讓這個當地址被觸摸時,谷歌地圖推出 如果電話號碼被觸摸時,phonecall放置

+0

感謝您的鏈接,但我有一個比URL方案更基本的問題。 如何從顯示的ABPersonViewController中獲取數據。 屏幕顯示電話號碼,地址,電子郵件等,但我如何實際檢索數據並將其存儲在NSString或NSURL等中 – 2010-06-04 12:55:22

回答