Slide 40
Slide 40 text
6*$PMMFDUJPO7JFX'MPX-BZPVUΛͬͯɺEFMFHBUFͰذͤ͞Δ ॳڃ
func collectionView(collectionView: UICollectionView,
layout collectionViewLayout: UICollectionViewLayout,
sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
switch (indexPath.section, indexPath.item) {
case (0, 0) where traitCollection.userInterfaceIdiom == .Phone:
return CGSize(width: aWidth, height: aHeight)
case (0, 0) where traitCollection.userInterfaceIdiom == .Pad:
return CGSize(width: aWidth / 2, height: aHeight)
..
..
..
}
}