Last active
December 24, 2015 17:19
-
-
Save hafizrahman/6835037 to your computer and use it in GitHub Desktop.
Use setTag to as identifier for the UICollectionView objects, which can then be used by delegate and datasource methods.
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
for (int i = 0; i < 5; i++) { | |
UICollectionView *currentCollectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, maxWidth, collectionViewHeight) collectionViewLayout:layout]; | |
// Trick to let the delegate and data source functions deal with the multiple UICollectionView's | |
[currentCollectionView setTag:i]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment