Возвращает элемент ячейки на весь экран.
collectionView.register(UINib(nibName: "standardArticle", bundle: Bundle.main), forCellWithReuseIdentifier: "standardArticle")
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let customCell = collectionView.dequeueReusableCell(withReuseIdentifier: "standardArticle", for: indexPath)
return customCell
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: 200, height: 200)
}
Пример изображения: