ios - Swift - dequeueReusableCellWithReuseIdentifier, Cells of collectionViewController (in UIView) won't load after scrolling

只愿长相守 提交于 2019-12-11 15:06:42

问题


I have a ViewController with 3 views :

  • Header (UIView)
  • TabBar (UIView)
  • UIView3 (UIView)

In my UIView3 I have a collectionViewController. A key element is that I put my collectionViewController.scrollEnable = False because otherwhise, when I'm scrolling, only the UIView3 is scrolling and I want my entier screen to scroll (so that if we scroll enough my Header and Tabbar are hidden.

So this is what I have :

And this is how my screen looks like :

Which is perfect. But, when I'm scrolling down, this is what it should looks like :

But instead, it looks like this :

I think my problem comes from the "dequeueReusableCellWithReuseIdentifier" function which doesn't see that I'm scrolling but I have no idea how to "refresh" the scroll value so it loads the end of cells 3-4 and also the cells 5-6.

Do you have any idea ?

来源:https://stackoverflow.com/questions/31871490/ios-swift-dequeuereusablecellwithreuseidentifier-cells-of-collectionviewcon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!