CoreData 中使用NSPredicate过滤空值时,遇到需要考虑 nil 和 @”“ 的情况 , 刚开始想用sql语句 is not null, 但是发现会崩溃,后来经过多次实验总结:
[NSPredicate predicteWithFormat:@" fomat <> %@", @""] ; 就可以过滤掉nil, @”“ ,和 空;
[NSPredicate predicteWithFormat:@" fomat <> %@", @""] ; 就可以过滤掉nil, @”“ ,和 空;