On an iPhone 5s the left and right cards are not visible
Closed this issue · 1 comments
grundid commented
The space between the cards is too large for an iPhone 5s, so the user sees only one card. It's not obvious how to interact with the collection in this situation.
0ber commented
In your ViewController need to set item size
override func viewDidLoad() {
itemSize = CGSize(width: 214, height: 264)
super.viewDidLoad()
// register cell
let nib = UINib(nibName: "NibName", bundle: nil)
collectionView?.registerNib(nib, forCellWithReuseIdentifier: "CellIdentifier")
}
and if you use this delegates method:
override func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath)
must call super method:
super.collectionView(collectionView, willDisplayCell: cell, forItemAtIndexPath: indexPath)