Filter array in ios checking multiple properties
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an array of custom objects. The custom object look like this @interface User : NSObject @property(nonatomic, strong)NSString *user_Id; @property(nonatomic, strong)NSString *user_Name; @property(nonatomic, strong)NSString *user_UserName; @end I have to filter the array checking 2 properties.That is if I search a then it should get list of users filtered from array contains a in user_Name or user_Id .How can i achieve this? For a single property i know[user_Name] NSString *predicateString = @"user_Name MATCHES[c] %@"; NSString