ios - NSPredicate 问题
<p><p>我想删除除 RestaurantLocation 或 GrayRestaurantLocation 之外的所有注释。</p>
<p>版本是否正确?</p>
<pre><code>[mapView removeAnnotations:[mapView.annotations
filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:
@"! ( (self isKindOfClass: %@) AND (self isKindOfClass: %@) )",
, ]] ];
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>注释不能同时是 RestaurantLocation 和 GrayRestaurantLocation。</p>
<p>将 <code>AND</code> 更改为 <code>OR</code>。</p></p>
<p style="font-size: 20px;">关于ios - NSPredicate 问题,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/6139172/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/6139172/
</a>
</p>
页:
[1]