Checking for iOS Location Services

后端 未结 4 2046
别那么骄傲
别那么骄傲 2020-12-23 10:28

I have a view with a map and a button (like the Maps app once) that allows the user to center and zoom his current location on the map. If I can not use the locationServices

4条回答
  •  独厮守ぢ
    2020-12-23 11:03

    "locationServicesEnabled" checks if the user has enabled Location Services in Preferences. Your MapView probably checks this value already and should not set any values to "self.mapView.userLocation" if Location Services are not available. This SO question might give you some more info.

提交回复
热议问题