我有User
表,你可以在下面看到
id (Int)
name (String)
no (String)
number (Int)
我想用;
获取它let predicate = NSPredicate (format:"name CONTAINS[cd] (%@) || no CONTAINS[cd] (%@) && number == 5",search.text!, search.text!)
给我;
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Can't use in/contains operator with collection 0 (not a collection)'
错误,我该如何解决?我想通过输入搜索文本来搜索名称和无字符串。