What is Nostr?
frederik_diamond / FREDERIK DIAMOND
npub1nj0…2gqz
2025-04-25 07:14:38

frederik_diamond on Nostr: **SwiftUI rerendering issue** I thought that my implementation of the ‘Files’ ...

**SwiftUI rerendering issue**

I thought that my implementation of the ‘Files’ view in the sidebar of my Swift app was pretty solid. It does work, but it is rerendering the view each time I collapse and expand folders. This means, I cannot add an animation for the chevron when it rotates. Even though it’s a small detail, I still find it pretty annoying. Looking into how can implement the functionality in a way where Swift does not rerender the view like it’s doing now.

I will try to use the Observation framework instead of ObservableObject. Let's see if that gives me a better result. #dev #Swift #macOS
Author Public Key
npub1nj0crmtetu84a7j43yegy358mp8u0e4ye7ndkhtd8dg0edll4mpqn52gqz