UICollectionViewFlowLayout 的子类,用于单元格错位。
(查看示例以获取完整源代码)
_flowLayout = [[SGSStaggeredFlowLayout alloc] init];
_flowLayout.layoutMode = SGSStaggeredFlowLayoutMode_Even;
_flowLayout.minimumLineSpacing = 2.0f;
_flowLayout.minimumInteritemSpacing = 2.0f;
_flowLayout.sectionInset = UIEdgeInsetsMake(0.0f, 10.0f, 0.0f, 10.0f);
_flowLayout.itemSize = CGSizeMake(75.0f, 75.0f);
self.internalCollectionView.collectionViewLayout = _flowLayout;
PJ Gray
SGSStaggeredFlowLayout 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。