有一个数组,每个元素都是一个NSDictionary
.
NSMutableArray *mutArr = [NSMutableArray array];
for (Person *person in persons) {
NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:person.name, @"name", person.email, @"email", nil];
[mutArr addObject:dict];
}
self.arr = [[NSArray alloc] initWithArray:mutArr];
如何通过 using方法归档arr
名称或电子邮件包含字符串。@"filter string"
filterArrayUsingPredicate:
提前致谢!