草庐IT

addonCategoryId

全部标签

ios - swift 中的 NSPredicate 'IN' 运算符格式化问题。无法解析格式字符串

我在尝试创建如下所示的NSPredicate对象时遇到异常:letsearchPredicate=NSPredicate(format:"addonCategoryIdIN\(idsArray)")其中idsArray是由Int对象组成的swift数组。此行本身引发异常。控制台说:2015-10-0808:21:42.878bkApp[2569:510538]***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'Unabletoparsetheformatstring"addonCateg