这是我的阵列:
<__NSArrayI 0x7ae43cd0>(
Regular,
Ultra
)
我正在搜索数组:
- (void)textFieldDidChange:(UITextField *)textField
{
NSPredicate *pred =[NSPredicate predicateWithFormat:@"name beginswith[c] %@", textField.text];
NSArray *filteredArr = [[[[arryService objectAtIndex:0] valueForKey:@"Category"] filteredArrayUsingPredicate:pred] mutableCopy];
NSLog(@"%@",filteredArr);
}
但它崩溃了@
NSArray *filteredArr = [[[[arryService objectAtIndex:0] valueForKey:@"Category"] filteredArrayUsingPredicate:pred] mutableCopy];
为什么会这样?