【发布时间】:2012-02-02 19:28:07
【问题描述】:
我的ManagedObject 中有一个NSDate 数组,我想使用稍后只给我NSDate 的表达式创建一个NSFetchRequest。
NSExpression *keyPathExpression = [NSExpression expressionForKeyPath:@"eventDate"];
NSExpression *futureDateExpression = [NSExpression expressionForFunction:@"> now" arguments:[NSArray arrayWithObject:keyPathExpression]];
我正试图弄清楚如何编写这个函数。我尝试了其他变体,例如 SELF > now 或 %@ > now、SELF > now()
所有这些都给了我SIGABRT。
【问题讨论】:
标签: objective-c ios nsdate nsfetchrequest