Skip to content

Commit 2397f22

Browse files
authored
Merge pull request #6 from Rusik/main
Fix issue with SwiftUI View hosted in a UIHostingController
2 parents 67049c0 + 5831743 commit 2397f22

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Sources/BottomSheet/Core/Presentation/BottomSheetPresentationController.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,12 @@ extension BottomSheetPresentationController: UIViewControllerAnimatedTransitioni
548548

549549
let completion = { (completed: Bool) in
550550
transitionContext.completeTransition(completed && !transitionContext.transitionWasCancelled)
551+
// For fix bug: https://openradar.appspot.com/FB9075949
552+
if #available(iOS 13, *), transitionContext.transitionWasCancelled {
553+
let sourceViewFrame = sourceView.frame
554+
sourceView.frame = .zero
555+
sourceView.frame = sourceViewFrame
556+
}
551557
}
552558

553559
let options: UIView.AnimationOptions = transitionContext.isInteractive ? .curveLinear : .curveEaseInOut

0 commit comments

Comments
 (0)