Member-only story
Efficient UIKit Shadows
Shadows have never been so much fun
7 min readApr 12, 2023
Before we start
Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 12.2, and Swift 5.3
Prerequisites
- You’ll need to either be able to write an iOS application or write some Swift code in Playgrounds
Keywords and Terminology
Storyboard: A visual representation of the User Interface of an Application
UIView: An object that manages the content for a rectangular area on the screen
This article
Background
Oh shadows. You are likely to want to put shadows on `UIView` subclasses when you use UIKit, and it seems reasonably simple — A `UIView` has a layer and shadows can be applied programmatically using the following properties”
* shadowColor
* shadowOffset
* shadowOpacity
* shadowPath
* shadowRadius
which (as we shall see) can pretty simply create shadows.