I have a mapView using xib file now when i touch in the mapview i want the latitude and longitude of that particular area so there any whey or any sample code which help me in this task.Thanks in Advance.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
With iOS 3.2 or greater, it’s probably better and simpler to use a
UIGestureRecognizerwith the map view instead of trying to subclass it and intercepting touches manually.First, add the gesture recognizer to the map view:
Next, implement
shouldRecognizeSimultaneouslyWithGestureRecognizerand returnYESso your tap gesture recognizer can work at the same time as the map’s (otherwise taps on pins won’t get handled automatically by the map):Finally, implement the gesture handler: