KelvinJin / AnimatedCollectionViewLayout

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

Importing this library has no effect #66

Open yangweiyi opened 3 years ago

yangweiyi commented 3 years ago

ParallaxAttributesAnimator has no effect why ?

lazy var baseCollectionView: UICollectionView = { let layout = AnimatedCollectionViewLayout() layout.animator = ParallaxAttributesAnimator() layout.itemSize = CGSize(width: UIScreen.main.bounds.width, height: 200) layout.minimumLineSpacing = 0 layout.minimumInteritemSpacing = 0 layout.scrollDirection = .horizontal let baseView = UICollectionView(frame: CGRect(x: 0, y: 90, width: UIScreen.main.bounds.width, height: 200), collectionViewLayout: layout) baseView.isPagingEnabled = true baseView.delegate = self baseView.dataSource = self baseView.collectionViewLayout = layout baseView.register(BannerCollectionViewCell.self, forCellWithReuseIdentifier: "BannerCollectionViewCell") return baseView }()