Post

Replies

Boosts

Views

Activity

Reply to Animated Custom Transitions Crash using Swift 6
I found a way to work around this issue. Posting in case it works for you too. Previously, I was applying a transition to a text view and using the .hidden modifier to trigger its visibility. Like: Text(label) .hidden(isHidden) .transition(TextTransition()) When declaring the transition this way, the View would crash, presumably because some object is deallocated while the animation is still running If I declare it this way though, it works: if !isHidden { Text(label) .transition(TextTransition()) } Not sure why it works this way... someone more familiar with SwiftUI internals might know
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’25