美文网首页
ScrollView重复加载导致糊掉

ScrollView重复加载导致糊掉

作者: 静花寒 | 来源:发表于2016-11-30 10:38 被阅读21次
730E9461-D574-4088-8B7C-220E233E6496.png

在代码中初始化的时候,将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;
        }

相关文章

网友评论

      本文标题:ScrollView重复加载导致糊掉

      本文链接:https://www.haomeiwen.com/subject/vtzzpttx.html