This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Description
in objective-c
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
return CGSizeMake(320, 120);
}
not works
in swift:
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
return CGSize(width: self.view.frame.size.width, height: 120)
}
not works
:(
only i can change size item with this code:
let layout:APLExpandableSectionFlowLayout = self.collectionView.collectionViewLayout as! APLExpandableSectionFlowLayout
layout.itemSize = CGSizeMake(self.view.frame.size.width, 120);
layout.minimumLineSpacing = 4
layout.scrollDirection = .Vertical
layout.sectionInset = UIEdgeInsetsMake(8, 8, 0, 8);
but i need to do by NSIndexPath