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

Newsletter: March 2020

Published on 01 Mar 2020

👋 Hi everyone

This month we’ll jump straight into the recap of the 13 articles, tips, podcast episodes and videos that were published on Swift by Sundell during February. Two new Swift Clips videos, brand new SwiftUI content, a pair of design-focused podcast episodes, and much more. Let’s dive in!

📖 Weekly articles

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

Slicing Swift collections

Let’s take a look at how we can utilize Swift’s various collection slicing APIs, and how doing so can help us boost the performance of various algorithms and functionality.

Exploring Swift 5.2’s new functional features

An exploration of two of Swift 5.2’s new features, that both give the language some really interesting capabilities from a functional programming perspective.

Configuring SwiftUI views

A look at a few different ways of configuring views when using SwiftUI, and the sort of pros and cons that each of those approaches gives us in terms of code structure and flexibility.

What makes code “Swifty”?

The phrase “Swifty code” is often used to describe code that follows the conventions that are currently the most popular within the Swift community. But what exactly does that entail? Let’s take a look.

✅ 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. This article was published during the past month:

Optionals

Let’s explore how optional values work in Swift, including how they’re implemented under the hood, and what sort of techniques that we can use to handle them.

🎧 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:

66: “Bridging the gap”, with special guest Meng To

Meng To, founder of Design+Code, joined me to go on a deep dive into SwiftUI from a design perspective, and to talk about how developers and designers can build scalable and flexible UIs using it. Also, structuring view code and components, the power of modifiers, and how SwiftUI compares to other UI tools and platforms.

67: “Building for open source”, with special guests Ryan Nystrom and Brian Lovin

Ryan Nystrom returned to the show accompanied by designer Brian Lovin, to go behind the scenes of the new GitHub mobile app which the two have been building. Also, creating a design system, building custom controls, and more discussions on how developers and designers can work better together.

⭐️ Swift tips

I love to share shorter tips, tricks and techniques with the community. These are the tips that I shared during the past month:

Picking between a for loop and forEach

A few tips on deciding how to implement each given iteration.

Passing key paths as functions

A quick look at one of Swift 5.2’s small but really useful new features.

Optional SwiftUI views

Various ways of conditionally creating SwiftUI views that depend on optional values.

Using SwiftUI’s ForEach with raw values

Transforming strings, integers, and other raw values into SwiftUI views.

📺 Swift Clips

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

Dispatch queues

A look at the DispatchQueue API, and how we can use it to write concurrent and asynchronous code in Swift.

SwiftUI stacks and spacers

Let’s take a look at how SwiftUI’s various stacks and spacers can be used to achieve many kinds of flexible, adaptive layouts with very little code. While SwiftUI does include several more advanced layout APIs, stacks and spacers are a great starting point for most UIs.

😊 Until next time

That’s it for this edition! I hope you enjoyed this newsletter. 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! 🚀