PBJHexagon
是 UICollectionView 的简单六边形网格布局。它最初是为 DIY 应用 创建的,用于显示技能六边形。
请查阅 发布历史 获取更多信息。
GitHub 问题的页面是一个开始讨论的好地方,同时也允许其他人从中获益并参与项目。
CocoaPods 是推荐的方法,只需将以下行添加到您的 Podfile
pod 'PBJHexagon'
#import "PBJHexagonFlowLayout.h"
PBJHexagonFlowLayout *flowLayout = [[PBJHexagonFlowLayout alloc] init];
flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
flowLayout.sectionInset = UIEdgeInsetsZero;
flowLayout.headerReferenceSize = CGSizeZero;
flowLayout.footerReferenceSize = CGSizeZero;
flowLayout.itemSize = CGSizeMake(80.0f, 92.0f);
flowLayout.itemsPerRow = 4;
_hexagonGridViewController = [[UICollectionViewController alloc] initWithCollectionViewLayout:flowLayout];
'PBJHexagon' 在 MIT 许可下提供,有关更多信息,请参阅 LICENSE 文件。