April 2020
Beginner
316 pages
8h 20m
English
It goes without saying that modifiers in SwiftUI have been a blessing in disguise. Where previously we would have had to make a series of changes in order to make a simple amendment such as a border with a corner radius, the use of a one-line modifier does all the hard work for us.
In some cases with UIKit, we could ease the pain a little by creating extensions that we could reuse again and in our current project and across other projects too.
By comparison, you can think of a modifier as an extension of some sort, wrapping up little bundles of complex logic and adding them to one line of code.
Let's start by taking a look at how we can create a border in a UIButton with a corner radius:
button.backgroundColor ...
Read now
Unlock full access