UICollectionReusableView method not being called

后端 未结 11 739
暗喜
暗喜 2021-01-31 13:13

I want my sections in the UICollectionView to have a header with an image.

I have followed these steps:

  • at the storyboard, assigned a header a
11条回答
  •  佛祖请我去吃肉
    2021-01-31 13:50

    Did you add UICollectionViewDelegateFlowLayout in current interface? This worked for me.

    @interface MyViewController ()

    Swift:

    class MyViewController: UICollectionViewDelegateFlowLayout {

提交回复
热议问题