KelvinJin / AnimatedCollectionViewLayout

A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView without effecting your existing code.
MIT License
4.7k stars 347 forks source link

RotateInOut - Cells are not vertical @ center #53

Open jminutaglio opened 4 years ago

jminutaglio commented 4 years ago

I'm seeing that cells are not centered in RotateInOut (and other animators) - meaning at the center position of the scroll - using isPagingEnabled - the cell is rotated.

let layout = AnimatedCollectionViewLayout()
layout.animator = RotateInOutAttributesAnimator(minAlpha: 1)
myChartCollectionView.collectionViewLayout = layout
myChartCollectionView.frame = CGRect(x: 0, y: 144, width: 414, height: 718)
layout.itemSize = CGSize(width: 384, height: 624)
layout.minimumLineSpacing = 0
layout.minimumInteritemSpacing = 0
layout.sectionInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
myChartCollectionView.isPagingEnabled = true
layout.scrollDirection = .horizontal

myChartCollectionView.dataSource = self
myChartCollectionView.delegate = self

Is this a bug in the center/rotation calculator AnimatedCollectionViewLayout or a setting/config I'm missing? TY!