Episode #474

Gradient View

Series: Layout in Code

11 minutes
Published on January 28, 2021

This video is only available to subscribers. Get access to this video and 584 others.

One really useful UIView subclass I generally have on all my projects is a simple GradientView. You give it two colors and optionally some location values and it draws a gradient from top to bottom. In this episode we build this so that we can integrate a fade to black effect to overlay on top of the background image.

This episode uses Swift 5.3, Xcode 12.3.