Liu Pengpeng
Liu Pengpeng

Reputation: 11

Use xib, how to make a height of 0.5

https://dl.dropboxusercontent.com/s/u91qmcqg1tdabv4/stackoverflow-01.png

Like this, but, return will make 0.5 change to 0.

Upvotes: 0

Views: 383

Answers (2)

IQworld Master
IQworld Master

Reputation: 603

This height is the calculation of pixels and you cannot put pixels in point; they are always numbers 0,1,2,3,4...

Upvotes: 0

Nazariy Vlizlo
Nazariy Vlizlo

Reputation: 977

Call this method(use UICollectionViewDelegateFlowLayout):

- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath    
{    
if (_heightIsZero)
    return CGSizeMake(320, 0);
else
    return CGSizeMake(320, 75);
}

Upvotes: 1

Related Questions