在iPhone应用程序中点击获取坐标 [英] get coordinates on tap in iphone application

查看:99
本文介绍了在iPhone应用程序中点击获取坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个iPhone Mapkit应用程序.我想获取用户在地图屏幕上点击的坐标.

I am create a iphone Mapkit application. I want to get the coordinates where the user has tapped on the map screen.

最好的问候, 纳韦德·拉菲(Naveed Rafi)

Best Regards, Naveed Rafi

推荐答案

处理触摸事件,然后使用convertPoint:toCoordinateFromView:

Handle the touch event and then Use convertPoint:toCoordinateFromView:

http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKMapView_Class/MKMapView/MKMapView.html#//apple_ref/occ/instm/MKMapView/convertPoint:toCoordinateFromView :

这篇关于在iPhone应用程序中点击获取坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆