Try to fix Live Text control weridness during interactive gallery dismissal

This commit is contained in:
Shadowfacts 2024-11-26 20:05:55 -05:00
parent 19c3008c8f
commit 88176fe599
1 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,12 @@ class GalleryDismissAnimationController: NSObject, UIViewControllerAnimatedTrans
container.layoutIfNeeded() container.layoutIfNeeded()
// Hide overlaid controls immediately, to prevent the Live Text button's position
// getting caught up in the rest of the animation.
UIView.animate(withDuration: 0.1) {
content.setControlsVisible(false, animated: false, dueToUserInteraction: false)
}
let duration = self.transitionDuration(using: transitionContext) let duration = self.transitionDuration(using: transitionContext)
var initialVelocity: CGVector var initialVelocity: CGVector
if let interactiveVelocity, if let interactiveVelocity,