[MKAnnotationView setAnimatesDrop:]:无法识别的选择器已发送到实例但为什么?

问题描述

|
(MKAnnotationView *) mapView:(MKMapView *)theMapView
             viewForAnnotation:(id <MKAnnotation>)annotation
{
    if ([annotation isKindOfClass: [MyLocation class] ])
    {
        MKPinAnnotationView *annotationView = (MKPinAnnotationView *) [theMapView dequeueReusableAnnotationViewWithIdentifier:placemarkIdentifier];
        if(annotationView == nil)
        {
            annotationView = [[MKPinAnnotationView alloc]initWithAnnotation:annotation reuseIdentifier:placemarkIdentifier];
        }
        else 
        {

            annotationView.annotation = annotation;         
        }

        annotationView.enabled = YES;
        annotationView.animatesDrop = NO;
        annotationView.pinColor = MKPinAnnotationColorPurple;
        annotationView.canShowCallout = YES;
        annotationView.draggable = YES;


       return annotationView;
    }
}
instance1ѭ无法识别的选择器发送到实例。 我使用了许多注释类(MKPinAnnotationView和MKAnnotationView)。因为我使用了dequeueReusableAnnotationViewWithIdentifier,所以可能发生了此错误。     

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)