开发者

Move a pin according to the position of the user

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜