Articles, podcasts and news about Swift development, by John Sundell.

Newsletter: May 2020

Published on 01 May 2020

Here’s a quick summary of all Swift by Sundell content from the past month — 12 different articles, tips, videos and podcast episodes.

📖 Weekly articles

For 167 weeks, I’ve been publishing a new article about Swift every Sunday. These articles were added during the past month:

A guide to the SwiftUI layout system - Part 3

This article wraps up the SwiftUI layout system series with how we can customize the layout behaviors of our views using tools like layout priorities and alignment guides.

Published properties in Swift

Let’s explore the topic of published properties, by reimplementing Combine’s @Published property wrapper with support for earlier versions of Apple’s operating systems.

Mixing enums with other Swift types

Swift’s enums are really powerful, but they can often be made even more capable when mixed with other kinds of types — such as protocols and structs. Let’s take a look at a few examples of doing just that.

Querying collections in Swift

This article is about exploring how we can make use of the standard library’s built-in algorithms when performing various types of queries against collections of values.

✅ Basics

With the Basics series, my goal is to build up a comprehensive library of articles that cover most of the core aspects of Swift and iOS development. These articles were published during the past month:

Protocols

What makes Swift a protocol-oriented language, and how can protocols be used to create abstractions and to enable code reuse? That’s what we’ll take a look at in this Basics article.

Combine

Combine is a really powerful reactive programming framework from Apple, but getting started with it can be quite difficult, so let’s go through the basics of its API and its core concepts.

🎧 Podcast episodes

The Swift by Sundell podcast is a bi-weekly show featuring special guests from all around the Swift community. You can find it in your podcast player of choice, for example Apple Podcasts or Overcast. These episodes were published during the past month:

70: “Risks and rewards”, with special guest Christian Selig

Christian Selig, creator of the Apollo Reddit app, joined me to talk about building apps against third party APIs, and what sort of criteria an app needs to meet to be considered a “good platform citizen”. Also, REST vs GraphQL, architecting API clients, and more.

71: “Polymorphic interfaces”, with special guest Dave Abrahams

Dave Abrahams joined me to talk about Protocol-Oriented Programming and how to make the most out of the Swift Standard Library. We also discussed Swift’s overall design, why it puts such a strong emphasis on value types and protocols, and how it’s been influenced by other languages.

⭐️ Swift tips

I love to share shorter tips, tricks and techniques with the community. You can now also find all of the tips that I’ve ever posted as mini-articles on the site! These are the tips I shared during the past month:

Handling keyUp and keyDown events on iOS 13.4 and later

How to observe and handle iOS 13.4’s new granular keyboard events.

Combining dynamic member lookup with key paths

How Swift’s @dynamicMemberLookup feature can be used in a completely type-safe manner.

Enums with custom raw types

It might initially seem like enums can only use built-in types (like Int and String) as their raw types, but they actually support using completely custom types as well.

📺 Videos

Swift Clips is a brand new series of shorter YouTube videos covering Swift tips and techniques. This video was published during the past month:

Controllers in MVC

Let’s take a look at the role that controllers play within the MVC design pattern, and how we can avoid some of the most common issues when working with them — particularly around how we can break up Massive View Controllers into smaller building blocks.

🙌 You’re all caught up!

I hope you enjoyed this summary, and all of the content that I published during April. Like always, I’d love to hear your feedback — so feel free to either email me, or contact me on Twitter @johnsundell. I read every single piece of feedback that I get, and I try to reply to as many people as I possibly can.

Thanks for reading! 🚀