-1

Code:

func collectionView(\_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -\> UICollectionViewCell {
let cell = myCollectionView.dequeueReusableCell(withReuseIdentifier: "CollectionViewCell", for: indexPath) as! CollectionViewCell
cell.alpha = 0
return cell
}

cell.alpha not working please help

toyota Supra
  • 3,181
  • 4
  • 15
  • 19

1 Answers1

0

You can apply the alpha to the cell's content.

cell.contentView.alpha = 0.3
Kunal Kamble
  • 138
  • 1
  • 6