Red Mak February 2016
UICollectionView fixed Content Size
I'm trying to create a keyBoard extension using UICollectionView (i try to use UIButtons but the keyBoard take long time to load so i'm trying to use collection view maybe it will be better).
My questions are:
- what is better: to have a better responsiveness, should i use xib or code ?
- My principle issue is that i can't fix the content size of the collectionView layout so i can't fix the height of cell (direction == UICollectionViewScrollDirectionVertical)
here's how i'm trying to fix the cell height:
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
return CGSizeMake(self.keyBoardCollectionView.frame.size.width/Keys_In_section.count, self.keyBoardCollectionView.frame.size.height/sections.count);
using this code the width is correct but not the height (this is cause direction == UICollectionViewScrollDirectionVertical)
Asked in February 2016
Viewed 3,492 times
Answered 1 times
Leave an answer
Quote of the day: live life