Fade the First and Last Elements in a UICollectionView
Watch those indices
3 min readSep 15, 2022
Before we start
Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 12.2, and Swift 5.3
Prerequisites:
- You will be expected to be aware how to make a Single View Application in Swift.
- Subclass
UICollectionViewCell
Keywords and Terminology:
UICollectionView: An object that manages an ordered collection of data items and presents them using customizable layouts
This project
The motivation
I want to make by UICollectionView
instances that little bit better. I want to bring the user’s attention to the cell that is wholly visible on the screen.
You know what, I’ll set the alpha of the cells that are not fully displayed so they look slightly washed out.
Wait, how am I going to do that?