Daresay

Follow us for the latest thoughts and perspectives on design, tech and teamwork from the people of…

Shimmer Effect with SwiftUI

--

Shimmer Effect is the Digital Bread.

Just like the bread is served in fancy restaurants before the meal, we serve Shimmer Effect before the real data.

Shimmer Effect
Shimmer Effect

A single shimmer row in above animation is result of below gist :

Nice that we use both overlay and mask to achieve perfect shimmer.

mask as it sounds, exposes a limited area covering the rest, and that limited area is our overlay.

We animate both mask and overlay with exact same animation and the result we get is a smooth Shimmer Effect.

By tuning in maskViewGradient and mainViewGradient you can create different variations of Shimmer.

It’s that simple!

Ciao!

--

--

Daresay
Daresay

Published in Daresay

Follow us for the latest thoughts and perspectives on design, tech and teamwork from the people of Daresay. We cover areas such as digital product development, user centered design, accessibility, sustainability and teamwork.

Arslan Rafique
Arslan Rafique

No responses yet