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.
精彩评论