i have simple CollectionView
but it works well in iphone 4
and 5
and 5s. but when i run in to iphone 6
and 6plus
it look like
but i want to remove space between cell in iphone 6
and 6 plus
. is it property for remove space ?? if is it property pls tell me.
- (CGSize)collectionView:(UICollectionView *)collectionView
layout:(UICollectionViewLayout *)collectionViewLayout
sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
float width = collectionView.frame.size.width / 2;
return CGSizeMake(width, width);
}
for Swift
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize
{
return CGSizeMake(collectionView.frame.size.width/2, collectionView.frame.size.width/2)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With