Slide 11
Slide 11 text
func collectionView(collectionView:UICollectionView,
heightForItemAtIndexPath indexPath:NSIndexPath,
withWidth:CGFloat) -> CGFloat
switch atIndex.row {
case 0: return CGSizeMake(collectionViewWidth, 232)
case 1: if property.contactInfo != nil {
return CGSizeMake(collectionViewWidth, 48)
} else {
return CGSizeZero
}
case 2: return CGSizeMake(collectionViewWidth, 227)
case 3: return CGSizeMake(collectionViewWidth, 230)
case 4: if userPlaces.count > 0 {
return CGSizeMake(collectionViewWidth,
130+CGFloat(userPlaces.count*72))
}
else {
return CGSizeMake(collectionViewWidth, 178.0)
}
}