SwiftUI View hosted in a UIHostingController: Cancelling an interactive dismiss causes Button not to respond to taps

Number:rdar://FB9075949 Date Originated:04.11.2021
Status:Open Resolved:No
Product:iOS/iPadOS Product Version:
Classification:SwiftUI Reproducible:Yes
Reproduction Steps:
- Create a custom presentation, supporting interactive dismiss (e.g by subclassing UIKit's UIPercentDrivenInteractiveTransition)
- Use this custom presentation for presenting a UIHostingController, showing a simple SwiftUI Button
- Use the pan gesture to dismiss the UIHostingController, but cancel it in the middle - so that UIHostingController is still presented

Expected Results:
The SwiftUI Button should still receive taps.

Actual Results:


Workaround solution

Found workaround solution: Need to reset "from" frame to .zero at UIViewControllerAnimatedTransitioning.interruptibleAnimator on dismiss event

Example here: - https://github.com/ivan-gaydamakin/uikit-swiftui-transition-ios14-bug/blob/6454146ff146ba19dc139ff6f4df39848b711a25/FluidTransition/Transition/Animations/DismissAnimation.swift#L26

By ivan.gaydamakin at June 29, 2021, 10:15 a.m. (reply...)

Same problem

Also I prepared example to reproduce it: https://github.com/ivan-gaydamakin/uikit-swiftui-transition-ios14-bug

By ivan.gaydamakin at June 28, 2021, 1:59 p.m. (reply...)

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!