ScrollView重复加载导致糊掉
2016-11-30 本文已影响21人
静花寒

在代码中初始化的时候,将subview全部清除就可以了
代码如下:
case 3:{
HomeHotCategoryViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:hotCategoryIdentifier forIndexPath:indexPath];
[(HomeHotCategoryViewCell *)cell setDelegate:self];
[cell.productListScrollView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
productSpecialListModel *model = productSpecialListArray[indexPath.row];
[(HomeHotCategoryViewCell *)cell setProductDataModel:model];
return cell;
break;
}