Post

Replies

Boosts

Views

Activity

iOS 17 Beta 3: Animation.spring().speed(2) ends on incorrect frame and continues to animate after duration
(Radar already filed, posting here for others / visibility) iOS version: iOS 17.0 (21A5277j) Xcode version: Version 15.0 beta 4 (15A5195m) The problem: When a Spring animation with a speed modifier is applied to a view to animate an offset, AND a DragGesture is used to affect that offset, AND the user triggers a second DragGesture before the animation from the first completes, all future animations have strange end states and ongoing jitter. How to reproduce: ( 0. Create a new Xcode project and replace the file ContentView with the attached file.) Run on a device (I used an iPhone 11 Pro) Drag the purple box down, then release it. Before the box has finished animating back to its starting position, place a finger on the box and begin dragging it down again. Release the box. Expected: The box animates back to its starting offset and stays there. Actual: The box animates back to its starting offset, then jumps to a new location. If you watch closely, it may then continue to move around by a few pixels. Also, the text inside the box does not correctly follow the container animation. Note: this only occurs when the speed modifier is applied to the animation. If you toggle this off in the code sample, you will see the animation behaves as I described in "Expected:" ContentView.swift
0
1
571
Jul ’23