mapView에서 4 ~ 5 가지 종류의 주석 클래스가 있습니다. 다음 코드에서는 AnnotationType1 만 for 루프에 응답해야합니다.MKMapView에서 perticular MKAnnotation 클래스 검색
for (AnnotationType1* annotation in mymap.annotations)
{
NSLog(@"annotation class is %@", [annotation class]);
}
콘솔에서 분명히 알 수 있듯이 다른 클래스도 있습니다.
annotation class is AnnotationType1
annotation class is AnnotationType2
annotation class is AnnotationType3
annotation class is AnnotationType4
AnnotationType1 annotation에서만 동작을 수행하는 가장 좋은 방법은 무엇입니까?
@Caleb에게 감사드립니다. 그것은 매우 유용했습니다. 나는 다양한 종류의 주석 유형을 저장하기 위해 별도의 배열을 가질 것이다. – chatur