は、だから私はこの呼び出しを使用しています:MKMapView MFCnnotationsにパディングを表示するようマップを指示しますか?
mapView.showAnnotations(annotations, animated: true)
が注釈を表示するアプリをアニメーション化します。それは素晴らしい作品です。私はその上に必要なものを、私が呼ぶとき、それは通常にズーム域の左側にパディングの100個のピクセルを追加する地図を伝えることです:
mapView.showAnnotations(annotations, animated: true)
私は上の地図の景色を持っています画面の左側にあり、注釈が表示されないようにするため、左側にパディングを追加して、ビューに隠れないようにします。
mapView.setVisibleMapRect(mapRect, edgePadding: UIEdgeInsetsMake(20, 100, 20, 20), animated: true)
しかし、私は結合しようとすると、それは本当に、特に働いていない:
mapView.showAnnotations(annotations, animated: true)
と:
mapView.setVisibleMapRect(mapRect, edgePadding: UIEdgeInsetsMake(20, 100, 20, 20), animated: true)
私はMKMapViewは "setRegion" を呼び出して、試してみました
これを達成する正しい方法は何ですか?
あなたは注釈を常に表示するか、注釈を表示する必要がありますか? –
[iOS-MKMapView showAnnotations:animated:padding?]の複製が可能です。(https://stackoverflow.com/questions/21912339/ios-mkmapview-showannotationsanimated-with-padding) – nathan
@ReinierMelian私はほとんどの時間が必要です。どうして? – zumzum