Fade the First and Last Elements in a UICollectionView

Watch those indices

Steven Curtis
3 min readSep 15, 2022
Photo by meriç tuna on Unsplash

Before we start

Difficulty: Beginner | Easy | Normal | Challenging

This article has been developed using Xcode 12.2, and Swift 5.3

Prerequisites:

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?

The Project

--

--