我想删除除 RestaurantLocation 或 GrayRestaurantLocation 之外的所有注释。
版本是否正确?
[mapView removeAnnotations:[mapView.annotations
filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:
@"! ( (self isKindOfClass: %@) AND (self isKindOfClass: %@) )",
[RestaurantLocation class], [GrayRestaurantLocation class]]] ];
注释不能同时是 RestaurantLocation 和 GrayRestaurantLocation。
将 AND
更改为 OR
。
关于ios - NSPredicate 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6139172/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |