ios - Searching a UITableView: cell images won't change -
i filtering array in way provide content table view:
- (void)filtercontentforsearchtext:(nsstring*)searchtext scope:(nsstring*)scope { nspredicate *resultpredicate = [nspredicate predicatewithformat:@"self contains[c] %@", searchtext]; filteredtabledata = [[allfilenames filteredarrayusingpredicate:resultpredicate] mutablecopy]; } -(bool)searchdisplaycontroller:(uisearchdisplaycontroller *)controller shouldreloadtableforsearchstring:(nsstring *)searchstring { [self filtercontentforsearchtext:searchstring scope:[[self.searchdisplaycontroller.searchbar scopebuttontitles] objectatindex:[self.searchdisplaycontroller.searchbar selectedscopebuttonindex]]]; homecoming yes; }
when alter text in search bar, search done , see cells similar names popping up. cell.imageview.image seems not changing. right title label image before search in cell... why happen?
ios
No comments:
Post a Comment