ios - UICollectionView with two columns, different cell sizes and one after the other -
this i'm aiming for:
but collection view looks this:
theres kind of separator between different rows. don't need them resize auto layout, it's repeated pattern of 4 cells know exact size of each one.
i'm using
func collectionview(collectionview: uicollectionview, layout collectionviewlayout: uicollectionviewlayout, sizeforitematindexpath indexpath: nsindexpath) -> cgsize { for size of each cell
and flow layout:
let flowlayout = uicollectionviewflowlayout() flowlayout.scrolldirection = .vertical flowlayout.minimumlinespacing = 10 flowlayout.minimuminteritemspacing = 5 how can approach separation?
you cannot using uicollectionviewflowlayout. have subclass uicollectionviewlayout , create own custom collection view layout.
thankfully great guys @ ray wenderlich have done tutorial on how create custom collection view layout mimicks layout of pinterest app. layout trying achieve.


Comments
Post a Comment