Assertion Failure in UICollectionViewData validateLayoutInRect on ios7

后端 未结 8 1228
误落风尘
误落风尘 2021-02-12 12:51

Assertion Failure in UICollectionViewData validateLayoutInRect on iOS7.

I am trying to delete all UICollectionView items, one by o

8条回答
  •  一向
    一向 (楼主)
    2021-02-12 13:08

    in iOS 10 you must disable the prefetchingEnabled:

    // Swift
    if #available(iOS 10, *) { 
        collectionView.prefetchingEnabled = false 
    }
    
    //Obj C
    if ([self.collectionView respondsToSelector:@selector(setPrefetchingEnabled:)]) {
        self.collectionView.prefetchingEnabled = false;
    }
    

提交回复
热议问题