Created
October 5, 2013 00:54
-
-
Save hafizrahman/6835190 to your computer and use it in GitHub Desktop.
How to use tag in 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
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section | |
{ | |
NSInteger collectionID = collectionView.tag; | |
// do something about the id...... | |
} | |
// The cell that is returned must be retrieved from a call to -dequeueReusableCellWithReuseIdentifier:forIndexPath: | |
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
NSInteger collectionID = collectionView.tag; | |
// do something about the id... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment