ユーザーの現在の場所が更新され、注釈が固定されている間に、アクティビティ インジケーターを表示しようとしています。完全な住所または郵便番号による検索バーを使用してピンを更新している間、アクティビティ インジケーターは正常に機能します。
また、自分自身を追加しようとしました。acitivityIndicator.startAnimation() on viewDidAppear() も func で:
func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
if self.showMyLocation {
let locValue:CLLocationCoordinate2D = manager.location!.coordinate
print("locations = \(locValue.latitude) \(locValue.longitude)")
initialLat = locValue.latitude
initialLong = locValue.longitude
setInitialLocation()
self.showMyLocation = false
}
}
現在地を見つけるのに時間がかかりますが、インジケーターは表示されません。なぜそうなのか、何か分かりますか?