Animation glitch when interactively dismissing modal VC with custom presentation

Originator:simon.javora
Number:rdar://36771251 Date Originated:
Status:open Resolved:
Product:iOS Product Version:
Classification: Reproducible:always
 
Summary:
While implementing an interactively dismissible controller that doesn't cover the entire screen and can be dismissed with a pan gesture, I came across a weird behavior where the animation jumps back to it's initial position and then back to where it is supposed to be. Sample project: https://github.com/sjavora/interactiveDismissalGlitch

Steps to Reproduce:
1) Launch the app on device (the issue seems less visible/present on the simulator)
2) open the modal controller using the button
3) slowly drag up or down (works in both directions)

Video of issue: https://github.com/sjavora/interactiveDismissalGlitch/blob/master/glitch.mov?raw=true

Expected Results:
The animated view controller follows drag movement.

Actual Results:
The animated view controller briefly returns to initial position.

Version/Build:
iOS 11

Configuration:
Xcode 9.2, High Sierra 10.13.2

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!