You can make a mutable copy like this
recherchemutablearray = [[myObject filteredArrayUsingPredicate:resultPredicate] mutableCopy];
Question
Hello,
I search solution for my problem but I didn't found an answer.
My problem is that UISearchDisplayController no display anything.
I think is this part of code :
- (void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope
{
NSPredicate *resultPredicate = [NSPredicate predicateWithFormat:@"name contains[c] %@", searchText];
recherchemutablearray = [myObject filteredArrayUsingPredicate:resultPredicate];
}
Because recherchemutablearray with [myObject filteredArrayUsingPredicate:resultPredicate] return an array so as xcode say the pointer are incompatible...
I don't understand how i can do filteredUsingPredicate:resultPredicate but to return a NSMutableArray.
After, it possible that there is an another problem in search fonction part code but I need to resolve this first.
Thanks
La solution
You can make a mutable copy like this
recherchemutablearray = [[myObject filteredArrayUsingPredicate:resultPredicate] mutableCopy];