I want to have two collection views that scrolls like this: the goal
I have achieved this but I then have the problem that when I scroll down the green collection view scrolls for alone and not the whole view: collection view with scroll
I then locked the scroll in the green collection view and put a scroll view around the whole screen. But when you scroll the collection view gets cut like this: collectionview locked
I have seen other apps like medium have two collection view that scrolls in two directions but I can not figure out have to achieve this. Medium home
To make the scroll view able to scroll have I done this to calculate the height of the two collectio views and then setting the heigt to the scrollview:
var size : CGSize
let height = firstView.frame.height +
secondview.collectionViewLayout.collectionViewContentSize.height
size = CGSize(self.view.frame.width,height)
scrollview.contentSize = size
And my guess is that I might want to do the same for the green collection view but I have not got that to work.
Thanks!