zepojo/UPCarouselFlowLayout

How to center it in collectionView?

bizibizi opened this issue · 1 comments

How to center it in collectionView?

@bizibizi

override func viewDidLayoutSubviews() {
self.setupLayout()
if self.indexNumber == 0{ /// set only for the 1st index cell.
let layout = UPCarouselFlowLayout()
layout.itemSize = CGSize(width:view.frame.width, height:448)
layout.scrollDirection = .horizontal
self.collectionView.collectionViewLayout = layout
}
self.rotationDidChange()
}