关于navigationController和pvc的问题
- (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];
}
在我的表格视图中,当单击一个单元格时,将执行上述代码,并推送一个新视图,并且项目(地址、电话等)在触摸时不执行任何操作。
如何才能在触摸地址时启动 Google 地图 如果触摸电话号码,则会拨打电话
- (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];
}
In my tableview, when a cell is clicked, the above code is executed a new view is pushed and the items (address, phone, etc) do nothing when touched.
How do I make it so that when the address is touched, Google Maps launches
If the phone number is touched, the phonecall is placed
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看下面的
http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationEnvironment/ApplicationEnvironment.html#//apple_ref/doc/uid/TP40007072-CH7- SW26
Have a look at the following
http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationEnvironment/ApplicationEnvironment.html#//apple_ref/doc/uid/TP40007072-CH7-SW26