Day 80 and we’re learning about Result, image interpolation, and context menus.

This stood out to me:

Remember, context menus are by their nature hidden, so please think twice before hiding important actions in a context menu.

Undiscoverable UI might as well be no UI at all. I value explicit UI that’s easy to discover and understand. #100DaysOfSwiftUI

The iOS Simulator shows a color selection menu with Red, Green, and Blue options. Red is highlighted and checked. The context menu comes from a Change Color button. Blurred out in the background is a tab view and a cartoon alien image from the Kenney Platform Art Deluxe bundle.

Day 79 and we’re (finally) learning about TabView, my favorite way to keep our example code around!

One actual takeaway from today: impressive that an EditButton can affect the state of a List in the same view without any explicit bindings; I’m usually cautious of “magical” APIs. #100DaysOfSwiftUI

The iOS Simulator displays a white screen with a blue button labeled Show Tab 2 in the center. A tab bar at the bottom has two tabs, One with a blue star icon and Two with a gray circle icon.

For Day 78, we started saving the user’s current location when they save one of the photos to the app. Easy peasy! #100DaysOfSwiftUI

The iOS Simulator displays a detail view with a photo of a field with green plants, one yellow flower, and a sandy background, paired with a map showing the location saved with a red pin near Anza Boulevard and the Interstate 280.

Day 77 was a doozy of a challenge: build an entire app from scratch that imported a photo, prompted for a name, stored both somehow (I chose SwiftData), display it in a list, and show a detail view.

It was a lot of work but took me about an hour from start to finish. #100DaysOfSwiftUI

The iOS Simulator displays a “Photos” app with two pictures: Flowers, with a thumbnail of pink flowers, and Waterfall, with a thumbnail of a waterfall surrounded by greenery. You can tap on a row to go to the detail view. There are edit and add buttons in the top navigation.

For Day 76, we had a quiz and challenge: fix accessibility issues in three of our past apps.

For Cupcake Corner, I couldn’t reproduce the issue.

For iExpense, the fix was easy.

For Moonshot, there were a couple images that needed labels, but I couldn’t find any other issues. #100DaysOfSwiftUI


I liked Paul’s message on Day 75 of #100DaysOfSwiftUI much better:

There’s a New York lawyer called Gregory Mansfield who fights for disability rights, and he once wrote this: “Accessibility is not charity. Accessibility is not generosity. Accessibility is not an amenity. Accessibility is not a gratuity. You don’t bestow access – you ensure it.”

👏


On Day 74 we’ve started learning about accessibility.

I‘m not a fan of how this is framed:

Tony Fadell – the creator of the iPod at Apple – had this to say: “you are defined by what you do and also by what you don’t do.”

Sure, you can skip accessibility and 90% of people won’t notice, but do you want to be defined by that? I’d wager that the answer is no.

I wish this focused on accessibility as a fundamental human right that’s needed by all of us at one point or another… not just an arbitrary percentage (that is really low as well). #100DaysOfSwiftUI

The iOS Simulator displays a screen with a photo of a yellow flower field under a blue sky. Below, text shows “Your score is 1000.” Further down, “Value 10” appears with “Increment” and “Decrement” buttons in blue.

Day 73 was a challenge day, so I had fun refactoring some of the code from the main View into a ViewModel and adding error handling. #100DaysOfSwiftUI

The iOS Simulator displays a view with a blue button labeled “Unlock Places” and an alert is above the view with an error message stating “Biometry is not enrolled,” with an OK button to dismiss. The bottom tab bar shows tabs for Day 70, Day 69, and Day 68.

Today we refactored our code to use MVVM and added “unlock with FaceID” to this part of the app.

From Day 72:

Tip: I get lots of questions about why I place my view models into view extensions, […]. This is a small app, but think about how this would look when you have 10 views, or 50 views, or even 500 views. If you use extensions like this, the view model for your current view is always just called ViewModel, and not EditMapLocationViewModel or similar – it’s much shorter, and avoids cluttering up your code with lots of different class names!

Hm, I’m not 100% convinced… #100DaysOfSwiftUI

The iOS Simulator displays a view with a blue button labeled “Unlock Places” and the FaceID interface is shown above the view, indicating it’s being used to unlock the view. The bottom tab bar shows “Day 70” selected in blue and “Day 69” and “Day 68” inactive in gray.

For Day 71, we used Wikipedia’s API to fetch places near a set of coordinates. I had no idea this was a thing, and I already have an existing app idea that I think could leverage this. #100DaysOfSwiftUI

The iOS Simulator displays a “Place details” screen with a title field reading “Windermere Peaks” and a note field with “Take me to the lakes.” Below, a list of nearby locations includes lakes, towns, and landmarks in Cumbria, England.

For Day 70 we added the ability to pin locations on a map and edit them.

We were supposed to use .onLongPressGesture, but I couldn’t get it to work in the previews or simulator, so I just used another .onTapGesture. #100DaysOfSwiftUI

The iOS Simulator displays an Apple Maps view highlighting Windermere Peaks with a red star icon. Nearby locations include Lake District National Park, Windermere, and Kendal. A tab bar at the bottom includes tabs for Day 70 (currently selected), Day 69, and Day 68.

Day 69 was short: we learned how to 1) add different types of maps and 2) use Face ID to unlock the app. #100DaysOfSwiftUI

The iOS Simulator displays an app with three maps of London: one satellite, one with red pins for Buckingham Palace and the Tower of London, and another with blue text labels for those two landmarks. Buttons for Paris and Tokyo are visible between the first and second map. A Face ID prompt overlays the screen and a button indicates the biometrics are currently Locked. A tab bar at the bottom includes tabs for Day 69 and Day 68.

Day 68 has been some of the most interesting content (from a language-learning perspective) in a while.

First, yes the method is just called <, which is the “less than” operator. It’s the job of the method to decide whether one user is “less than” (in a sorting sense) another, so we’re adding functionality to an existing operator. This is called operator overloading, and it can be both a blessing and a curse.

I don’t think I’ve ever worked in a language with operator overloading and it definitely makes me nervous about maintainability. #100DaysOfSwiftUI

The iOS Simulator displays a screen with a list of names in alphabetical order: Kochanski Kristine, Lister David, and Rimmer Arnold. Below the list, a button labeled “Read and Write” is shown, with the word “Loading…” below it.

Day 67 is the last day for this particular project, so we had a review quiz (got 12/12) and added some features to the app without any code prompts, just requirements.

I’m always a little nervous when the challenges are easy… what did I miss? 😅 #100DaysOfSwiftUI

The iOS Simulator displays an app titled Instafilter. A confirmation dialog shows a list of filter options under the heading Instafilter, including Bump Distortion, Crystallize, Droste Effect, Edges, Gaussian Blur, Pixelate, Sepia Tone, Twirl Distortion, Unsharp Mask, and Vignette, with a Cancel button at the bottom.

Back at it after a little Thanksgiving break and we’ve run into our first (I think) need to use @MainActor.

Today we added the ability to change image filters and share the resulting image. #100DaysOfSwiftUI

The iOS Simulator displays an app titled Instafilter. The image of flowers from Day 65 is shown, but this time through a “crystallize” filter. The “Intensity” slider is set to 75% with “Change Filter” and “Share…” buttons below. Underneath is a bottom tab bar with four tabs labeled Day 65–66, Day 64, Day 63, and Day 62, with Day 65 selected.

Day 65 and this sort of thing still gets me:

We can then call that whenever our selectedItem property changes, by attaching an onChange() modifier somewhere in ContentView – it really doesn’t matter where, but attaching it to the PhotosPicker would seem sensible.

We covered modifiers and building our own much earlier in the course, but I still don’t have a good mental model for how/why you can put some of them anywhere and they’ll work. #100DaysOfSwiftUI

The iOS Simulator displays an app titled Instafilter. A sepia-toned image of flowers is shown, with a slider labeled “Intensity” set to 75% with a “Change Filter” button below. Underneath is a bottom tab bar with four tabs labeled Day 65, Day 64, Day 63, and Day 62, with Day 65 selected.

For Day 64 we learned how to use PhotosPicker to… let the user pick photos, use ShareLink to… create share links, and call requestReview() to… request the user leave a review of our app! #100DaysOfSwiftUI

The iOS Simulator displays a screen with links/options in blue text, including “Select a picture,” two “Share…” buttons, “Spread the word about Swift,” “Click to share,” and “Leave a review.” A bottom tab bar shows three tabs labeled Day 64, Day 63, and Day 62, with Day 64 selected.

For Day 63, we learned about the different Image APIs available: Image, UIImage, CGImage, and CIImage. We also tried out ContentUnavailableView!

I continued my normal practice of keeping all the sample code in the project and building UI to see it all. #100DaysOfSwiftUI

The iOS Simulator displays a segmented control with options including sepia, pixellation, crystal, twirl, and dynamic. Below, a “Bro, do you even Swift?” meme (with a picture of Taylor Swift) is displayed with a sepia filter applied. Below the image is a placeholder view with the Swift logo, text that says “No snippets,” a “Create Snippet” button, and a tab bar with Day 63 selected.

For Day 62, I liked that we were shown “Open Quickly” in Xcode and told how to find the definition of a generated interface. I don’t fully understand it now, but I know I will in a couple years.

Oh, and for the start of a new project, we played around with confirmationDialog(). #100DaysOfSwiftUI

The iOS Simulator displays an app with “Hello World” text that is blurred out based on the value of a slider below the text. A red square labeled “Hello, World!” is in the center of the view. A confirmation dialog overlays the screen at the bottom with a prompt to select a color. Options are “Red,” “Green,” “Blue,” and “Cancel.”

Nope, today was the hardest challenge.

I thought it was weird that yesterday’s challenge didn’t require us to use SwiftData (when we had just spent a bunch of days working with it).

Day 61, the other shoe drops—we need to rewrite yesterday’s app to use SwiftData. #100DaysOfSwiftUI