Skip to content

Commit f54f04a

Browse files
committed
Fix issue with SwiftUI View hosted in a UIHostingController
1 parent 9e58dcd commit f54f04a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Sources/BottomSheet/Core/Presentation/BottomSheetPresentationController.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,10 @@ extension BottomSheetPresentationController: UIViewControllerAnimatedTransitioni
534534

535535
let completion = { (completed: Bool) in
536536
transitionContext.completeTransition(completed && !transitionContext.transitionWasCancelled)
537+
// For fix bug: https://openradar.appspot.com/FB9075949
538+
if transitionContext.transitionWasCancelled {
539+
sourceView.frame = .zero
540+
}
537541
}
538542

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

0 commit comments

Comments
 (0)