I\'m using a UICollectionView with two prototype cells. The prototype cells have different widths and contain different controls (image view and web view). I\'m definitely ret
In Swift you can call sizeForItemAtIndexPath delegate method to set the size for each cell.
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
if indexPath.row == 0 {
// Set the size for cell no. 0
}else if indexPath.row == 1 {
// Set the size for cell no. 1
}
}
I hope that helps. Thanks!