Composition in Swift and iOS
Mar 18, 2020, 8:00 PM
“Favor composition over inheritance”
You’ve probably heard this Object-Oriented Programming adage over and over again, but have you ever wondered what it implied? What does it mean in the context of iOS development?
Together, let’s dive...
Don't Subclass UIKit Controls, Wrap Them Instead
Feb 23, 2020, 7:00 PM
Don’t subclass UIKit controls (e.g. UIButton, UILabel, UITextField and UISlider).
UIKit is built on composition, and this fact is reflected throughout its API. Notice how almost none of the methods on UIKit controls require subclassing....
The 4 Steps to Properly Subclass UIView
Jan 28, 2020, 7:00 PM
Building views in code can seem daunting at first, especially when you’re used to doing it in Interface Builder. Today, I hope to show you that there isn’t any magic to it.
In UIKit, views are represented as a tree-like hierarchy. A...
The Many Faces of UIViewController
Jan 12, 2020, 7:00 PM
Breaking up massive view controllers can be difficult. When we look at a 3000-line controller, we know it should be smaller, but we often don’t know where to start. Some view controllers simply feel like they need to be massive because...
MVC is not to blame for your Massive View Controllers
Jan 4, 2020, 7:00 PM
When you start building apps with UIKit, MVC is the first pattern you learn. And with good reason: UIKit is, quite literally, built to function with MVC. The pattern does a lot of the heavy lifting early on, but as your app grows, your...
Everything You Know About GCD Is a Lie
Sep 21, 2019, 8:00 PM
I’ve been working hard on the Mastering iOS Concurrency with GCD Workshop, and I’ve realized that there’s a lot of things that we take for granted about concurrency on iOS.
It turns out that a lot of what I considered to be GCD best...
Getting Distractions Under Control
Sep 14, 2019, 8:00 PM
Distraction has been at the forefront of my mind recently because, more so than ever, I feel like I’ve finally gotten a handle on this problem. Sitting down to do focused work was becoming very difficult. And I know I’m not the only one to...
Decoding Typesafe Responses
Sep 7, 2019, 8:00 PM
Last time, we looked at how to define the requests in our network layer in a way that keeps our code clean.
But we only looked at one side of the equation because all we were doing was fetching data from the server. It’s a good start, but...
Keeping Your Network Layer Clean With DRY
Aug 21, 2019, 8:00 PM
Nearly every app interacts with a server on the web, and often more than one. You’d think that we all take great care of our network layer and make sure it evolves into something robust and reliable.
Hah. Not in my experience!