0
問題我將所有註釋添加到單獨的數組中。當我嘗試使用下面的代碼刪除已添加到的MapView註釋:從mapView中刪除註釋
if(![newClusters containsObject:cluster]){
[__mapView removeAnnotations:[__clusterAnnotations objectAtIndex:[__clusters indexOfObject:cluster]]];
[__clusterAnnotations removeObjectAtIndex:[__clusters indexOfObject:cluster]];
[__clusters removeObject:cluster];
}
我得到以下錯誤:
-[ClusterAnnotationClass countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance
我不知道這意味着什麼,我可以添加任何註釋就好了。它從mapView中移除時崩潰。
任何幫助,將不勝感激。
這是我的問題。感謝您的支持。 – Alex