For quite some time I’ve been collecting some tips and tricks in #Swift and #SwiftUI that I’d like to share with you. I’ll share a new tip every day and hope to last until at least WWDC
I'll also post same content on Twitter in case you prefer it over Mastodon
WWDC24 is right around the corner. Before the excitement and rush of what's to come, I want to share some navigation fun facts and tips. None of this is new, having been discussed previously in sessions, etc. From talking with developers, these are parts of the system that are often overlooked, or forgotten about #21DaysOfSwiftUINavigation#SwiftUI This is all running on macOS Sonoma 14.4, Xcode 15.3
I recently read a book about meditation practices and it mentioned a 3x3 gratefulness meditation, which made a lot of sense to me. You spend a couple of minutes each day finding three things you're thankful for in each of the categories: life, work, and self.
Anyway! I accidentally built an app prototype around this idea.
I need some design help, I’m not good at iOS development 😅
I have this screen. Originally, it was called “Dictionary”. This is where you look up words.
Then, due to SwiftUI being annoying, I had to add another title to that bottom sheet. Because that technically is also a part of the dictionary, I also gave it the title “Dictionary”. See pic no2 for what inside that bottom sheet.
But now I have the same title on the same screen twice, which is bad.
I'm struggling trying to convert my NavigationStack into one that has a path. When I tap on my Picker that has a style of .navigationLink the app locks up.
I tried making a test project to recreate but it works fine.
Is there something in particular I should be doing for a style of .navigationLink? The default style of menu works.
edit: Filed FB12615246. The screenshot below is using ".id" instead of the correct ".tag".
Ice Cubes is the perfect example of something wrong with the #SwiftUI List. I hope we'll see some improvements next #WWDC. It's time to say goodbye to the UICollectionView backend.
It’s weird, but to my understanding implementing MVC as originally envisioned is easier with #SwiftUI due to the whole obervables thing than it was with UIKit.
In MVC, the model was meant to notify the view of changes after the controller updated it, and funneling that both ways through the controller was always a variation.
When looking into custom accessible list reordering for @MuseumShuffle I had assumed .onMove would also provide accessibility actions similar to those in Notes or Reminders. I just did some checking and it seems onMove, onDrag, and draggable do not provide accessibility actions. Am I missing something? Is there a default Apple-recommended way to implement these features as accessibility actions? #SwiftUI#iOSDev
My SwiftUI previews for Please Don’t Rain stopped working and I couldn’t figure out why. I finally filed a TSI asking for help.
I have my answer.
They broke because I have an apostrophe in my app name. 😭
In order to get them working again now they are suggesting I do a “pretty thorough rename” throughout the app. My concern about breaking something else (and the time it would take to fix) is greatly overwhelming my desire to use previews that haven’t worked for months.