我想删除除RestaurantLocation或GrayRestaurantLocation之外的所有注释。
是正确的版本吗?
[mapView removeAnnotations:[mapView.annotations
filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:
@"! ( (self isKindOfClass: %@) AND (self isKindOfClass: %@) )",
[RestaurantLocation class], [GrayRestaurantLocation class]]] ];
答案 0 :(得分:3)
注释不能同时是RestaurantLocation和GrayRestaurantLocation。
将AND
更改为OR
。