UICollectionView with ContentInset is not Scrolling all the Way Down

后端 未结 6 1658
长发绾君心
长发绾君心 2020-12-29 06:20

I am setting the content inset of a UICollectionView:

[_collectionView setContentInset:UIEdgeInsetsMake(0.f, 0.f, 100.f, 0.f)];

Then I am s

6条回答
  •  猫巷女王i
    2020-12-29 06:57

    You can set the referenceSizeForFooterInSection function in your viewController class:

    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForFooterInSection section: Int) -> CGSize {
        return CGSize(width: view.frame.width, height: 50)
    }
    

    Just set the height to your required value.

提交回复
热议问题