0
안녕하세요.지도 용 자습서에 있습니다. 자습서에서 Xcode 7을 사용하고 있습니다.locationManeger.requestWhenInUseAuthorization()
그는이 링크를 사용하지만 새 버전에서는 중지되었습니다. 아무도 내가 이것을 복제하는 가장 좋은 방법을 알 수 있습니까?
plist에 NSLocationWhenInUseUsageDescription을 추가했습니다.
func locationAuthStatus() {
if CLLocationManager.authorizationStatus() == .authorizedWhenInUse {
map.showsUserLocation = true
}else {
//cant get this to work in ios10
locationManager.requestWhenInUseAuthorization()
}
}
도움이 되겠습니다. 해결