Skip to content

Commit

Permalink
Fix bug where presenting a sheet changes layout width
Browse files Browse the repository at this point in the history
  • Loading branch information
sampettersson committed Jan 11, 2023
1 parent 7e92d52 commit 95a87bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/Placement/Layouting/FrameChangePlacer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ class FrameChangePlacerView<L: PlacementLayout>: UIView {
override func layoutSubviews() {
super.layoutSubviews()

if let globalFrame = self.superview?.convert(
if let rootViewController = self.window?.rootViewController,
let globalFrame = self.superview?.convert(
self.frame,
to: self.window
to: rootViewController.view
) {
coordinator.globalFrame = globalFrame
}
Expand Down

0 comments on commit 95a87bd

Please sign in to comment.