Skip to content

Instantly share code, notes, and snippets.

@loic-sharma
Last active December 23, 2023 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loic-sharma/f4dd579b6814c5e855da9b3f873280ff to your computer and use it in GitHub Desktop.
Save loic-sharma/f4dd579b6814c5e855da9b3f873280ff to your computer and use it in GitHub Desktop.
SwiftUI tutorial feedback

SwiftUI tutorial feedback

Last updated: 2023-12-23

The SwiftUI tutorials are truly excellent. They raise the bar for a UI framework's introduction. Please don't be discouraged by the feedback below, you all have done wonderful work!

I have not completed the tutorials yet. I will add more content as I continue progressing through the tutorials.

Seek feedback

I'm likely not the first person that's had these issues. I would add a "feedback" button so that folks can give suggestions, report where they get stuck, or call out typos.

I would also do user studies of newbies following these tutorials. I suspect you will find more opportunities for polish!

I would also do an accessibility review of the tutorials.

Step navigation

Clicking on a step's text should move the tutorial forward to that step.

Each step should be linkable to make it shareable. Use cases:

  1. I run into problems and need to ask help
  2. I want to resume the current step on a different computer
  3. I want to share feedback on a specific step

Pressing the tab key jumps entire sections. This is not accessible. Tabbing should move the tutorial forward one step.

Code copying

If I make a mistake and get stuck, the easiest way to fix it is to replace my code with the current step's code.

However, copying code is hard, especially when the code is longer than the viewport. The current experience is not accessible.

There should be a "copy" button.

If I click on code and press apple+a, it should select only the code and not the entire page.

If I start a code selection and drag to the bottom, it navigates to the next tutorial step. This is particularly frustrating when code samples that are longer than the viewport - I don't know when the code sample ends, which makes it really easy to jump to the next step.

Note

See Building lists and navigation > Set up navigation between list and detail 6 of 9 > Step 2

This step's code is longer than the viewport on a 16 inch MacBook Pro. Try copying this code using a trackpad.

If I paste code into Xcode, empty lines are doubled into two empty lines. I have to manually delete these extra lines.

macOS support

The tutorial targets iOS and does not work on macOS. You will get build errors for features that are not supported on macOS.

I would consider making separate tutorials for macOS and iOS, or, making the tutorial work on both targets.

Specific content

Creating and combinding views > Create custom image view (4 of 7)

Tutorial link

Step 1

I missed that there was a .zip file we were supposed to download. I would make the text project files a link that downloads the .zip.

Building lists and navigation > Setup navigation between list and detail (6 of 9)

Tutorial link

Step 4

This step edits LandmarkList.swift while step 3 edited ContentView.swift. This file change is not called out explicitly, I found this confusing.

I much prefer how the Handling user input tutorial calls out whenever we change files.

Step 10

.navigationBarTitleDisplayMode(.inline) is not supported on macOS and gives an error if you're making a macOS app.

Check your understanding quiz

Check your understanding quiz, question #1. The answer is ForEach but this isn't introduced until a later tutorial. This doesn't seem like a fair question if the expectation is the user reads the tutorials in order.

Handling user input > Add a control to toggle the state > Step 3

Tutorial link

This adds an animation when you toggle the state. At first, adding the animation's code did nothing: toggling didn't animate and there were no errors. It turns out I put the animation on the ForEach instead of the List. Maybe be explicit and call out that the animation needs to be on the List?

Handling user input > Use observation for storage > Step 1

Tutorial link

ModelData appears to be split into Model Data - is this a typo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment