ShowAnnotationViewでピンとユーザーを同じ画面に収めたいと考えています。
ドキュメントを調べても分からず、ググっても情報がないので質問させてください。
- didUpdateLocations で毎回読み込むものなのでしょうか?
他で使っても機能しませんでした。
- ShowAnnotationView を使うと方角が固定されてしまうものなのでしょうか?
地図を回転して使えるようにしたいです。
userTrackingModeではfollowWithHeadingだと方角が固定されるけどfollowだと固定されないので、ShowAnnotationViewでも同じようにできないでしょうか?
Swift
1@IBOutlet weak var myMapView: MKMapView! 2 3//位置情報取得成功時のメソッド 4 func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) 5 //アノテーションを画面に収める 6 myMapView.showAnnotations(myMapView.annotations, animated: true) 7 8 //func showAnnotations(_ annotations: [MKAnnotation], animated: Bool) 9 10} 11
あなたの回答
tips
プレビュー