1 博客地址: UICollectionView 自定制布局,例子是钱包界面
基于 Custom UICollectionViewLayout Tutorial With Parallax
Parallax, 视差效果,
就是滚动的时候,cell 上面的图片 picture , 有一个纵向 ( y 轴 ) 的位移
上上下下的晃动
Latest Simple Card
Origin Card
1.Inherit your collectionView to MMCollectionView
@IBOutlet weak var cardCollection: MMCollectionView!
2.Create your Cell inherit "CardCell"
class CardACell: CardCell {
}
if let layout = cardCollection.collectionViewLayout as? CustomCardLayout {
layout.titleHeight = 100.0
layout.bottomShowCount = 3
layout.cardHeight = 300
layout.showStyle = .cover
}