我在这里有这个代码userTrackingMode = .follow
,它工作得很好,但它只是弹出Userlocation
而不是动画地图去用户位置......这就是我想要的。任何人都可以告诉我热添加该动画,使地图通过动画更改到用户位置,而不仅仅是弹出它(如果有意义的话)
import UIKit
import MapKit
import CoreLocation
class MapViewController: UIViewController,MKMapViewDelegate, CLLocationManagerDelegate{
@IBOutlet weak var mapView: MKMapView!
@IBAction func UserTrackingMode(sender: AnyObject) {
mapView.userTrackingMode = .Follow
}