Skip to content

Commit

Permalink
Improve fix for interactive dismiss cancellation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rusik committed Sep 29, 2022
1 parent f54f04a commit 5831743
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,10 @@ extension BottomSheetPresentationController: UIViewControllerAnimatedTransitioni
let completion = { (completed: Bool) in
transitionContext.completeTransition(completed && !transitionContext.transitionWasCancelled)
// For fix bug: https://openradar.appspot.com/FB9075949
if transitionContext.transitionWasCancelled {
if #available(iOS 13, *), transitionContext.transitionWasCancelled {
let sourceViewFrame = sourceView.frame
sourceView.frame = .zero
sourceView.frame = sourceViewFrame
}
}

Expand Down

0 comments on commit 5831743

Please sign in to comment.