Saturday, 15 January 2011

ios - Create a textfield over MKAnnotation Callout Swift -


I would like to create an editable callout, and this is the best way to create a text file in a quick way , I was wondering how to remove the CGP of annotations so that I could use it to keep the CGRx of my field of text. I'm using this code to display a annotation at a tape point, how would a reverse be? If anyone suggests better ways to create editable callouts, then the suggestions are welcome

  var point: CGPoint = gestureRecognizer.locationInView (self.Map) EventLoc = self.Map.convertPoint (Point, ToCoordinateFromView: self.Map) 

I'm not yet familiar with swift, but by language Free, MKMapView has a method in convertCoordinate: toPointToView: which you use to convert CLLocationCoordinate2D to CGPoint Can code>.

Edit

From:

Converts a map coordinate to a point in the specified view.

So the final argument in your case should be your map view:

whose coordinating system wants you to locate the specified map coordination if this parameter If zero, the return point is specified in the coordinate system of the window. If the view is not zero, then it should be related to the same window, such as map view.


No comments:

Post a Comment