使用 UICollectionView 实现下面的效果
途径 1,
简单直接, custom UICollection View Layout ,
横着码
途径 2,
UICollectionViewFlowLayout + UICollection View 的宽度控制
这样 layout 下,
func doLayout(){
collect.snp.makeConstraints { (m) in
m.top.equalToSuperview().offset(95)
m.leading.equalTo(title)
m.height.equalTo(40)
// item width * 3 + spacing * 2
m.width.equalTo(80 * 3 + 33)
}
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。