Skip to content

Commit 6f84e25

Browse files
committed
1 parent 0bc9812 commit 6f84e25

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Examples/Maps-SwiftUI/Maps/FloatingPanel/FloatingPanelView.swift

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ struct FloatingPanelView<Content: View, FloatingPanelContent: View>: UIViewContr
9898
hostingViewController.view.backgroundColor = nil
9999
fpc.set(contentViewController: hostingViewController)
100100
fpc.addPanel(toParent: parentViewController, at: 1, animated: false)
101+
102+
// Invalidate the UIHostingController's intrinsic content size
103+
// as it did not yet know the floating panel constraints.
104+
contentViewController?.view?.invalidateIntrinsicContentSize()
101105
}
102106

103107
func updateIfNeeded() {

0 commit comments

Comments
 (0)