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
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