我无法弄清楚如何让地图从viewDidLoad放大用户位置.我尝试设置一个区域,但这不起作用.这是我的代码,任何提示?
@IBOutlet弱var mapView:MKMapView!var MapViewLocationManager:CLLocationManager!= CLLocationManager()var currentLocation:PFGeoPoint!= PFGeoPoint()
override func viewDidLoad() {
super.viewDidLoad()
self.mapView.showsUserLocation = true
mapView.delegate = self
MapViewLocationManager.delegate = self
mapView.setUserTrackingMode(MKUserTrackingMode.Follow, animated: true)
}
Run Code Online (Sandbox Code Playgroud)
我已经查找了这个问题的答案但是没有在Swift中找到答案或者确实有效.谢谢!!