回答編集履歴
2
訂正
answer
CHANGED
@@ -1,10 +1,2 @@
|
|
1
1
|
`canShowCallout`を設定している`AnnotationView`は、`let pinView = MKAnnotationView()`で定義した`pinView`ですが、
|
2
|
-
`leftButton`を設定しているのは`annotationView`となっています。まずは、`annotationView`に`canShowCallout = true`して`leftButton`を設定してあげてはどうでしょうか?
|
2
|
+
`leftButton`を設定しているのは`annotationView`となっています。まずは、`annotationView`に`canShowCallout = true`して`leftButton`を設定してあげてはどうでしょうか?
|
3
|
-
|
4
|
-
それと、↓ですが、
|
5
|
-
|
6
|
-
```swift
|
7
|
-
let pinView = MKAnnotationView()
|
8
|
-
pinView.canShowCallout = true
|
9
|
-
```
|
10
|
-
pinViewはどこにも使用していないので必要ないのではないでしょうか?
|
1
不足分加筆
answer
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
`canShowCallout`を設定している`AnnotationView`は、`let pinView = MKAnnotationView()`で定義した`pinView`ですが、
|
2
|
-
`leftButton`を設定しているのは`annotationView`となっています。まずは、`annotationView`に`canShowCallout = true`してあげてはどうでしょうか?
|
2
|
+
`leftButton`を設定しているのは`annotationView`となっています。まずは、`annotationView`に`canShowCallout = true`して`leftButton`を設定してあげてはどうでしょうか?
|
3
3
|
|
4
|
+
それと、↓ですが、
|
4
5
|
|
5
6
|
```swift
|
6
7
|
let pinView = MKAnnotationView()
|