Last active
August 29, 2015 14:11
-
-
Save yuxiangq/93fdc5d139747b410488 to your computer and use it in GitHub Desktop.
UICollectionView的初始化
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)initUICollectionView{ | |
//初始化布局方式,这里采用垂直布局。 | |
UICollectionViewFlowLayout *flowLayout=[[UICollectionViewFlowLayout alloc] init]; | |
[flowLayout setScrollDirection:UICollectionViewScrollDirectionVertical]; | |
UICollectionView *collectionView=[[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:flowLayout]; | |
[self.view addSubview:collectionView]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment