Iphone 带下划线的NSPredicate崩溃
给我:Iphone 带下划线的NSPredicate崩溃,iphone,ios,objective-c,cocoa-touch,Iphone,Ios,Objective C,Cocoa Touch,给我: fetchRequest.predicate = [NSPredicate predicateWithFormat:@"identifer==1_12"]; 我尝试过使用匹配,比如,=,带空格==,不带空格等等。不知怎的,我觉得下划线是某种保留符号 有什么帮助吗?如果要与字符串“1_12”进行比较,必须用单引号将其括起来: Unable to parse the format string "identifier==1_12"' 或者: [NSPredicate predicateW
fetchRequest.predicate = [NSPredicate predicateWithFormat:@"identifer==1_12"];
我尝试过使用匹配,比如,=,带空格==,不带空格等等。不知怎的,我觉得下划线是某种保留符号
有什么帮助吗?如果要与字符串“1_12”进行比较,必须用单引号将其括起来:
Unable to parse the format string "identifier==1_12"'
或者:
[NSPredicate predicateWithFormat:@"identifer == '1_12'"]
[NSPredicate predicateWithFormat:@"identifer == %@", @"1_12"]