Skip to content

Commit 5831743

Browse files
committed
Improve fix for interactive dismiss cancellation bug
1 parent f54f04a commit 5831743

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Sources/BottomSheet/Core/Presentation/BottomSheetPresentationController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,10 @@ extension BottomSheetPresentationController: UIViewControllerAnimatedTransitioni
535535
let completion = { (completed: Bool) in
536536
transitionContext.completeTransition(completed && !transitionContext.transitionWasCancelled)
537537
// For fix bug: https://openradar.appspot.com/FB9075949
538-
if transitionContext.transitionWasCancelled {
538+
if #available(iOS 13, *), transitionContext.transitionWasCancelled {
539+
let sourceViewFrame = sourceView.frame
539540
sourceView.frame = .zero
541+
sourceView.frame = sourceViewFrame
540542
}
541543
}
542544

0 commit comments

Comments
 (0)