Hacking with Swift Live 2020

BONUS: Get hands on with key new features from WWDC20.

These articles are presented as free bonus material for Hacking with Swift+ subscribers, providing the videos recorded live at the event plus approximate text for those videos. The articles are only "approximate" because it was a live event – lots of questions were asked and answered along the way, and the videos also explore some bonus tangents not included in the articles.

Both the videos and articles regularly walk you through an interesting piece of code in a test project, set you an example task to implement that code in a real project, then usually provide an example solution for you to try if you weren't sure. It is strongly recommended you read them in order. You can download all the project files for these articles by clicking here.

Because the videos were recorded live at the event some of the code used in them may have changed in subsequent Xcode versions. The articles have been updated to work with Xcode 12.5, so if you find something doesn't work please refer to the article.

Day 1: What's new in Swift and SwiftUI?

The first step of our project will be to build the core of the app itself, providing all the fundamental features. Everyone needs to follow these steps.

What’s new in Swift?

1:12:42

1. What’s new in Swift?

In this introduction we go through the core language improvements in Swift 5.3, including multiple trailing closures, type-based program entry points, and more, before moving on to the first new SwiftUI feature: lazy stacks.

Using maps in SwiftUI

1:06:58

2. Using maps in SwiftUI

We’re going to look at integrating MapKit into SwiftUI, but first I want you to try integrating your new knowledge of lazy stacks into a real iOS app.

Disclosure indicators, paging TabView, and grids

1:29:28

3. Disclosure indicators, paging TabView, and grids

In this part we’ll be exploring three important additions to SwiftUI from WWDC20, then starting to integrate them into our app.

From grids to map annotations

1:04:20

4. From grids to map annotations

We’re going to upgrade our map with annotations, but first I want to give you the chance to implement grids in our Journeys app so you can see them in action with your own code.

Day 2: Continuing with SwiftUI

The first step of our project will be to build the core of the app itself, providing all the fundamental features. Everyone needs to follow these steps.

Expanding lists and iPad sidebars

1:21:46

5. Expanding lists and iPad sidebars

In this part we’ll be looking at upgrades to SwiftUI’s List view that let us expand and collapse rows, then try out the iPadOS sidebar style.

iPadOS sidebars and labels

59:06

6. iPadOS sidebars and labels

We’re going to implement your sidebar knowledge in Journeys so you can see it in action, then move on to examine the new Label view in iOS 14.

From labels to matching animations

1:31:57

7. From labels to matching animations

In this part we’ll work through another task to help you try out labels in Journeys, then move on to explore scaled metrics and the beginnings of matched geometry effects.

Adding matched geometry effects to Journeys

56:38

8. Adding matched geometry effects to Journeys

In this part we’re going to look at an example solution to implement matched geometry animations in our Journeys app.

Day 3: From SwiftUI to UIKit

The first step of our project will be to build the core of the app itself, providing all the fundamental features. Everyone needs to follow these steps.

Starting NaNoGo

1:28:19

9. Starting NaNoGo

In this part we’ll start a second project that uses a whole new range of SwiftUI features, including TextEditor, multiple scenes, ColorPicker, and more.

@AppStorage, ProgressView, and documents

1:01:00

10. @AppStorage, ProgressView, and documents

In this part we’re going to start by looking at storing app information in UserDefaults, then move on to showing progress with ProgressView, and finally loading and saving documents.

UIKit updates: UICollectionView lists

1:26:39

11. UIKit updates: UICollectionView lists

In this part we’re going to build an app to explore SF Symbols, all built using the massive new updates to UICollectionView that let it act like a table view.

From UICollectionView to UIAction

1:05:06

12. From UICollectionView to UIAction

In this part we’re going to wrap up our look at the new UICollectionView features, then move on to exploring the new UIAction and menu systems for buttons and more.

Day 4: App Clips and Widgets

The first step of our project will be to build the core of the app itself, providing all the fundamental features. Everyone needs to follow these steps.

Introduction to App Clips

1:20:32

13. Introduction to App Clips

App Clips let us ship tiny slices of our app to do exactly one thing, and in this part we’ll explore how to build them in a test environment.

Implementing App Clips in a real app

1:01:00

14. Implementing App Clips in a real app

Now that you understand how App Clips work, in this part we’ll apply them to our Barking Lot app so you can see them in action with real code.

Last but not least: widgets

1:24:55

15. Last but not least: widgets

For our last topic, we’re going to explore widgets. iOS has had widget-like behavior for some time through its Today extensions, but in iOS 14 they gained a lot more functionality.

Just for fun: weather forecasting

1:09:19

16. Just for fun: weather forecasting

Now you understand how widgets work, I want to give you a fun and simple task to experiment with. There’s no example solution here because this is just a sandbox for your ideas, but we’ll end up with a fun quiz to test what you learned.