开发者

A user-movable dot on a map view?

开发者 https://www.devze.com 2023-02-17 16:37 出处:网络
What would be the best way to place a dot (a custom png) on an MKMapView, and allow the user to move the dot around the map. Additionally, when the finger is released, the map should center on the开发

What would be the best way to place a dot (a custom png) on an MKMapView, and allow the user to move the dot around the map. Additionally, when the finger is released, the map should center on the开发者_StackOverflow dot...

Are the any techniques which could make this possible?


I think you should check out the MKOverlayView class, as this should help you out with drawing the custom png.

You could perhaps subclass this class and override the instance methods – touchesMoved:withEvent:, – touchesEnded:withEvent and – touchesCancelled:withEvent: to handle the user input?

0

精彩评论

暂无评论...
验证码 换一张
取 消