for(NSInteger item = 0; item < items; item++){
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:item inSection:section];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SUBQUERY(SELF.indexPath, $a, $a == %@).@count != 0", indexPath];
NSArray *row = [[reticleMatrix filteredArrayUsingPredicate:predicate] firstObject];
MatrixElement *thisElement = nil;
if(row){
for(MatrixElement *element in row){
if([element.indexPath isEqual:indexPath])
thisElement = element;
}
}
我有这段代码,但似乎放慢了我的滚动视图。我怎样才能解决这个问题?