开发者

NSPredicate question

I want to delete all annotations except RestaurantLocation or GrayRestaurantLocation.

is it correct version ?

[mapView removeAnnotations:[mapView.annotations 
    filteredArrayUsin开发者_如何学编程gPredicate:[NSPredicate predicateWithFormat:
       @"! ( (self isKindOfClass: %@) AND (self isKindOfClass: %@) )", 
      [RestaurantLocation class], [GrayRestaurantLocation class]]] ];


An annotation can't be both a RestaurantLocation AND a GrayRestaurantLocation.

Change the AND to OR.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜