no UICollectionViewLayoutAttributes instance for -layoutAttributesForSupplementaryElementOfKind:

前端 未结 2 431
灰色年华
灰色年华 2021-01-03 12:09

The title is the error I\'m getting and I have no idea why, but here is some information so hopefully someone on here can elucidate me.

I have subclassed UICol

2条回答
  •  渐次进展
    2021-01-03 12:13

    I scoured the forums looking for an answer and came across a few suggestions. None of them gave me the succour I needed, and eventually in the interest of meeting deadlines, I dropped the use of supplementary views altogether.

    A few weeks later out of curiosity I looked around again and eventually came across the following post and now I'm back to using supplementary views again.

    So, don't forget to return your:

    - (NSArray *)indexPathsToDeleteForSupplementaryViewOfKind:(NSString *)elementKind
    {
        return self.removedIndexPaths;
    }
    

    to your collection view layout.

提交回复
热议问题