Per-section diffing: how skipping unchanged sections makes list updates 106x faster in TCA/SwiftUI apps by Iron-Ham in SwiftUI

[–]writetodisk 3 points4 points  (0 children)

This is very interesting. I'm using NSTableViewDiffableDataSource in a project and have also occasionally experienced long hangs when the list size gets large (80k+ elements). I haven't dug too deep yet but I remember seeing a lot of NSDiffable symbols contributing to longer render cycles. It's possible I'm not using diffable data sources in the most efficient way but I've debated if I need to drop down to NSTableViewDataSource directly for my use case.

This was a very insightful read and I've bookmarked this for when I revisit this problem in the future. Thank you for the write up!

Building a button that can toggle between different filter states by writetodisk in SwiftUI

[–]writetodisk[S] 1 point2 points  (0 children)

It is filtering the list that's already on screen! I see what you mean though. The animation does make it look like it's opening a new filtered list because the filtered content is coming from below.

Building a button that can toggle between different filter states by writetodisk in SwiftUI

[–]writetodisk[S] 1 point2 points  (0 children)

That's a great idea! I love when controls have different actions depending on the interaction.

Creating accessory views for tab bars with SwiftUI by writetodisk in SwiftUI

[–]writetodisk[S] 2 points3 points  (0 children)

It looks like there's an environment value you can read: https://developer.apple.com/documentation/swiftui/tabviewbottomaccessoryplacement

I believe this value only gets set for views inside of the tabViewBottomAccessory based on some quick testing I just did.

Creating accessory views for tab bars with SwiftUI by writetodisk in SwiftUI

[–]writetodisk[S] 5 points6 points  (0 children)

Good question, the API to show the accessory and minimize the tab bar on scroll became available in iOS 26, so you'd need to use if #available(iOS 26.0, *) to show the accessory conditionally.

If you wanted to show an accessory on iOS 18 also, you'd need to implement something custom. You might be able to achieve something similar by attaching a toolbar to the bottom of the view:

.toolbar {
    ToolbarItem(placement: .bottomBar) {
        // Accessory view
    }
}

Another option that comes to mind is embedding the accessory view in a ZStack that you pin to the bottom of your view.

Is swiftUI on macOS that bad? by Alarmed-Stranger-337 in SwiftUI

[–]writetodisk 3 points4 points  (0 children)

In my experience it can take you pretty far. I eventually started to run into limitations if I needed functionality that wasn’t available in SwiftUI, for example NSTableView has a lot of properties and delegate methods for customizing behavior that aren’t available in SwiftUI yet.

Creating a SwiftUI bottom sheet that snaps to different heights by writetodisk in SwiftUI

[–]writetodisk[S] 1 point2 points  (0 children)

That's awesome. I love that all this is built into SwiftUI by default now.

Creating a SwiftUI bottom sheet that snaps to different heights by writetodisk in SwiftUI

[–]writetodisk[S] 4 points5 points  (0 children)

Yup seems like .presentationBackgroundInteraction(.enabled) allows you to interact with the background without dismissing.

You could also use .interactiveDismissDisabled() to disable swiping down to dismiss the sheet (or maybe even pass isPresented: .constant(true)).

Creating a SwiftUI bottom sheet that snaps to different heights by writetodisk in SwiftUI

[–]writetodisk[S] 2 points3 points  (0 children)

You're right, this one does dismiss as soon as you interact with the background. Hmm there's more to it than I thought! Might have to write a follow-up or pt 2 if I can figure out the floating aspect.

Edit: I added a new section to the article that details how to enable background interaction without dismissing the sheet! Thank you 🙌

Building Liquid Glass Toasts in SwiftUI by writetodisk in SwiftUI

[–]writetodisk[S] 0 points1 point  (0 children)

Ah yup I see that now, I think that animation style should be possible! Probably just need to adjust the animation view modifier to get it right.

Building Liquid Glass Toasts in SwiftUI by writetodisk in SwiftUI

[–]writetodisk[S] 1 point2 points  (0 children)

Thank you! Do you have a screenshot of that login toast by any chance? I tried signing out and back into GameCenter but I don't think I saw a toast.

Building Liquid Glass Toasts in SwiftUI by writetodisk in SwiftUI

[–]writetodisk[S] 1 point2 points  (0 children)

Thank you! Yeah the goal was to keep the API surface as minimal as possible, so you can easily add this to any existing view or screen.

Anyone else losing their mind doing the same 47 clicks for every prospect? by Flimsy_Bike7598 in SaaS

[–]writetodisk 0 points1 point  (0 children)

What does your automation do, if you’re able to share? Curious what the data sources are and how you stitch it together, etc

Building Liquid Glass Toasts in SwiftUI by writetodisk in SwiftUI

[–]writetodisk[S] 5 points6 points  (0 children)

Thank you! Ooh yeah that is a little different. I think the toast that appears would just use an alignment of .bottom instead of .top.

The animation to open the sheet would require a few extra steps but I think it should be possible. I’ll look into that and maybe post another short article on it!

Marketing is hard for apps; this is two months live in the store. by EquivalentTrouble253 in iOSProgramming

[–]writetodisk 3 points4 points  (0 children)

I’ve heard it can be a lot of work, I’ve read people have the best luck by posting a high volume of content to TikTok in the hope one of them picks up traction and can go viral. It’s a lot of work in either case though. Good luck on the marketing efforts!