0
내 응용 프로그램에 문제가 있습니다. 사실, 별도의 응용 프로그램에서 코드를 실행하면 작동합니다. xCode가 오류를 표시하지 않고 모든 것이 잘 작동하지만 MapKit의 주석에서 상세 단추를 볼 수 없습니다. xCode에 더 깊은 문제가 있습니까? 내 코드입니다주석의 버튼이 나타나지 않습니다.
:
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {
let identifier = "Education"
if annotation is Education {
var annotationView = mapView.dequeueReusableAnnotationView(withIdentifier: identifier)
if annotationView == nil {
annotationView = MKPinAnnotationView(annotation: annotation, reuseIdentifier: identifier)
annotationView!.canShowCallout = true
let btn = UIButton(type: .detailDisclosure)
annotationView!.rightCalloutAccessoryView = btn
} else {
annotationView!.annotation = annotation
}
return annotationView
}
return nil
}
It looks like this on my app - no detail button on the right side of annotation.
모든 것이 작동합니다! 고맙습니다 :) –