【发布时间】:2010-01-08 09:42:14
【问题描述】:
我的托管对象有 2 个双字段:“纬度”、“经度”。 我需要获取所有具有特定坐标的对象
此代码不起作用,fetchedObjects count = 0
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"latitude == %f AND longitude == %f", coordinate.latitude, coordinate.longitude];
但是这段代码工作正常,fetchedObjects count = 3:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"latitude == 53.012667 AND longitude == 36.113000"];
【问题讨论】: