ios - Two UIViews & one UICollectionView inside UIScrollView (or better approach) -
i need have ios app screen this:
the idea when user start scroll down first uiview move until second uiview reach top stick , uicollectionview continue move up.
currently i'm using structure
- uiscrollview (main scroll)
- uiview (some banners)
- uiview (uisegmentedcontrol)
- uicollectionview (grid items, scroll disabled, main scroll used)
i manage it, needed set uicollectionview height constraint manually in code (calculated based on items in grid) in order appear in uiscrollview (everything else handled autolayout in storyboard). problem uicollectionview think cells visible , load them, whole recycling & reusing thing not work. it's worst because use willdisplaycell method on uicollectionview load more data when last cell displayed, load pages @ once.
my question (actually 2)
- how can fix issue above?
- what right way achieve functionality? maybe whole approach conceptually wrong?
collection view scroll view itself. maybe have same functionality collection view sections or custom layout?
Comments
Post a Comment