我试图在我的 NSPredicate 中满足 2 个条件,但出现以下错误。
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse the format string "(whosEval == %@) AND ([age integerValue] >= 9 && [age integerValue] <= 11)"'
我知道问题出在格式上,但我找不到任何对我有帮助的问题。我做错了什么?这是我正在使用的代码。注意:年龄是核心数据实体的字符串属性。
NSPredicate *evalPredicate =
[NSPredicate predicateWithFormat:@"(whosEval == %@) AND
([age integerValue] >= 9 && [age integerValue] <= 11)", currentAthlete];