Skip to content

Commit

Permalink
Merge pull request #6 from Rusik/main
Browse files Browse the repository at this point in the history
Fix issue with SwiftUI View hosted in a UIHostingController
  • Loading branch information
mikhailmaslo authored Sep 29, 2022
2 parents 67049c0 + 5831743 commit 2397f22
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,12 @@ extension BottomSheetPresentationController: UIViewControllerAnimatedTransitioni

let completion = { (completed: Bool) in
transitionContext.completeTransition(completed && !transitionContext.transitionWasCancelled)
// For fix bug: https://openradar.appspot.com/FB9075949
if #available(iOS 13, *), transitionContext.transitionWasCancelled {
let sourceViewFrame = sourceView.frame
sourceView.frame = .zero
sourceView.frame = sourceViewFrame
}
}

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

0 comments on commit 2397f22

Please sign in to comment.