开发者

Move a pin according to the position of the user

开发者 https://www.devze.com 2023-04-09 23:34 出处:网络
In my iPhone appli开发者_如何学运维cation, I want to drop a pin at my current location using mapView and I also need to move another pin or a ball as my position changes. How can I do this?To display

In my iPhone appli开发者_如何学运维cation, I want to drop a pin at my current location using mapView and I also need to move another pin or a ball as my position changes. How can I do this?


To display user location, just add :

mapView.showsUserLocation = YES;

To get it, use the method userLocation which gives you a MKUserLocation.

You can then add a id<MKAnnotation> object with addAnnotation method to display another pin.

0

精彩评论

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