位置情報の取得を許可するアラートダイアログの出現のさせ方を教えてください。
swift
1 2import CoreLocation 3 4var locationManager: CLLocationManager! 5 6@objc func allowPermissionTaped(btn: UIButton) { 7 let status = CLLocationManager.authorizationStatus() 8 9 //位置情報許可statusCheck 10 if (status != .authorizedAlways && status != .authorizedWhenInUse) { 11 //常に許可以外であれば 12 print("Status is (status)") 13 14 //許可メッセージを表示する 15 // 出し方がわからない 16 }else{ 17 //許可があれば 18 locationManager.startUpdatingLocation() 19 } 20 }
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。