Animation not working inside `NavigationStack`
Originator: | darren.mo | ||
Number: | rdar://FB13440468 | Date Originated: | 2023-12-03 |
Status: | Closed | Resolved: | 2023-12-03 |
Product: | SwiftUI | Product Version: | iOS 17.2 Seed 3 (21C5046c) |
Classification: | Incorrect/Unexpected Behavior | Reproducible: | Always |
I have attached a sample project that demonstrates a view transition animation. The transition does not animate when the views are wrapped in a `NavigationStack`. Fails on both iOS and macOS.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Oops, this was my mistake. I misunderstood what
Group
did. I should useZStack
/VStack
/HStack
instead ofGroup
so that theanimation
modifier is applied to the container view of the transition instead of to the individual subviews of theGroup
.