Collection View Scale Flow Layout

253 views Asked by At

I want to create layout for following layout inside collection view.

Scale Flow Layout

Align one cell in centre and two cell outside with scale down using transform.

I have used third party library DXScaleFlowLayout and implemented following code to make like same.

let scaleLayout = DXScaleFlowLayout()
scaleLayout.transformScale = 0
scaleLayout.isPagingEnabled = true
scaleLayout.minimumAlpha = 0.8
scaleLayout.minimumLineSpacing = 0
scaleLayout.minimumInteritemSpacing = 0
    
let width = self.cvBusinessPlans.bounds.width
let height = self.cvBusinessPlans.bounds.height
scaleLayout.itemSize = CGSize(width: width, height: height)
    
scaleLayout.sectionInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
    
self.cvBusinessPlans.collectionViewLayout = scaleLayout

But it didn't work for me. If anyone know how to make this then please help. I have search of SOF, but I can't find exact or similar solution.

0

There are 0 answers