WWDC 2019 Viewing Guide

Wow that was an interesting WWDC! After a “quiet” year in 2018, Apple has unleashed some dramatic changes in 2019. Here’s my viewing guide for the sessions I found most interesting this year.

Read On →

Exploring the Swift standard library source code

Have you found yourself stuck trying to make sense of a framework or library and wished you could see the source code? Apple does not share the source for UIKit but if the method you are struggling to understand is part of the Swift standard library you are in luck.

Read On →

Empty Strings in Swift

How do you tell if a string is empty in Swift? That depends on what you mean by “empty”. You might mean a string with zero length, or maybe also an optional string that is nil. What about a “blank” string that only contains whitespace. Let’s see how to test for each of those conditions with Swift.

Read On →

Comparing Version Strings

How do you compare two version strings in Swift? For example, how can I check if version “2.2.5” is higher than “2.0.3” or that a version is at least “1.8.5”? As long as your version strings follow a consistent format it turns out to be not too hard.

Read On →

Using The Responder Chain

The delegate pattern is often used by a child view controller to communicate with its parent view controller, but it’s not the only way. A lesser used, but occasionally useful, alternate approach is the responder chain.

Read On →
Archives Categories