Thread 1: Exception: "the view returned from -collectionView:viewForSupplementaryElementOfKind:atIndexPath (UICollectionElementKindSectionFooter,<NSIndexPath: 0x9daa4b3f8da35997> {length = 2, path = 1 - 0}) was not retrieved by calling -dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath: or is nil (<UICollectionReusableView: 0x139e9b3a0; frame = (0 0; 0 0); layer = <CALayer: 0x283d7f240>>)"
collectionView UICollectionReusableView 没有找到对对应注册的view 需要 viewForSupplementaryElementOfKind代理方法中添加
UICollectionElementKindSectionHeader
UICollectionElementKindSectionFooter
的对应的方法。可以复用的。
网友评论