卡片布局,支持水平、垂直滚动。Swift版本请点击这里
CardLayOut *layout = [CardLayOut new];
self.collectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:layout];
//cell间距
@property (nonatomic, assign) CGFloat spacing;
//cell的尺寸
@property (nonatomic, assign) CGSize itemSize;
//缩放率
@property (nonatomic, assign) CGFloat scale;
//边距
@property (nonatomic, assign) UIEdgeInsets edgeInset;
//滚动方向
@property (nonatomic, assign) UICollectionViewScrollDirection scrollDirection;