How do I start a function after the Collection View is fully loaded?
I use override func layoutSubviews()
but It's not working the way I want it to.
Thanks.
How do I start a function after the Collection View is fully loaded?
I use override func layoutSubviews()
but It's not working the way I want it to.
Thanks.
Do as follow (obj - c)
- (void)collectionView:(UICollectionView *)collectionView
willDisplayCell:(UICollectionViewCell *)cell
forItemAtIndexPath:(NSIndexPath *)indexPath{
if([indexPath row] == ((NSIndexPath*)[[collectionView indexPathsForVisibleRows] lastObject]).row){
//end of loading, now your collection view is fully loaded.
// Now call the method you wanted to call
}
}