使用collectionView做一个简单的相册滑动demo
首先创建一个LineFlowLayout
LineFlowLayout.h
@interface LineFlowLayout : UICollectionViewFlowLayout
@end
-----------------------------------------------
#import "LineFlowLayout.h"
@implementation LineFlowLayout
//初始化时会调用
- (instancetype)init{
if(self = [superinit]){
self.itemSize =CGSizeMake(150,150);
self.scrollDirection =UICollectionViewScrollDirectionHorizontal;
self.minimumInteritemSpacing =50;
self.minimumLineSpacing =