Blog Archives

Property Wrappers and User Defaults

I love magical new features that help us abstract away boiler-plate code and let us focus on the unique features of our apps. Property wrappers is such a feature, and seriously – it just feels like magic! Let’s take a

Tagged with: ,
Posted in Swift

SF Symbols in iOS 13

I was playing with the amazing SwiftUI with Apple’s tutorials (stay tuned, I hope to write something on SwiftUI soon) when I noticed something interesting: Where does this “star.fill” come from, I wondered… There’s no “star.fill” in the asset catalog?!

Tagged with: , , , ,
Posted in Swift

Swift 5 – it’s alive!

It’s been a couple of weeks now since Swift 5 has arrived, with a bunch of features, such as: ABI stability source compatibility isMultiple – a fancy technique for checking if a number is a multiple of another number. Dictionary

Tagged with:
Posted in Swift

Optionals in Swift explained – with a cat in a box!

If you’ve come to Swift from a language that doesn’t use optionals, you might find the concept a little strange and the syntax unfamiliar at first. Sometimes it helps to learn the unfamiliar with something familiar – in my lightning tour

Tagged with:
Posted in Swift

Get a continent from longitude-latitude

For a project I’m working on I needed to know if a point (latitude,longitude) was in a continent, and if so, which one! To do this, first I set up a Continent enum to work with, making it a String

Tagged with: ,
Posted in Swift

Getting the keyboard height

Some time ago I answered a question in StackOverflow comparing the keyboard height on the iPhone X and the iPhone 8: I got these heights by: 1. Adding an observer of the UIResponder.keyboardWillShowNotification notification: (In fact, if we want all keyboard frame

Tagged with:
Posted in Swift

Lightning tour of closures in Swift

Check out this video tutorial with a lightning tour of closures in Swift. It covers: Functions as data types Basic closure syntax Trailing closures   If you’re interested in more of these sorts of videos, I’ll be posting frequently over on

Tagged with: ,
Posted in Swift

Overloading functions with default parameter values

Here’s a Swifty conundrum for you! First a quick recap. Here’s a simple function with no parameters. Call it and “Hello World” will print to the console. Here’s another function with the same name. This time it has a parameter

Tagged with: , ,
Posted in Swift

Lightning tour of functions in Swift

Check out this video tutorial with a lightning tour of functions in Swift. It covers: Parameter default values Optional function parameters Overloading a function If you’re interested in more of these sorts of videos, I’ll be posting frequently over on the

Tagged with: , , , ,
Posted in Swift

iOS Video Course is live!

After many months of work, my video course iOS Development with Swift in Motion has recently launched over at Manning Publications. If you’re interested in taking on iOS Development, but aren’t sure if you’re ready to take the plunge, I’d

Tagged with: ,
Posted in Swift