我想要一个像这样的 NSPredicate :
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(latitude - %@) < %@",coordsLatitude, kMaxLatLong];
我基本上想在 Core Data 中找到与userLocation.
latitude是每个 gps 实体的纬度属性。coordsLatitude是 userLocation 的纬度。kMaxLatLong设置为 1
我得到了EXC_BAD_ACCESS这条线。我认为这是由于我的谓词格式不正确,尤其是减法运算符。但是,我找不到任何说明如何使用 NSPredicates 和 NSExpressions 的减法。