diff --git a/Sources/SwiftUISupport/ComponentSwiftUISupport.swift b/Sources/SwiftUISupport/ComponentSwiftUISupport.swift index 94ec7a7..e14be10 100644 --- a/Sources/SwiftUISupport/ComponentSwiftUISupport.swift +++ b/Sources/SwiftUISupport/ComponentSwiftUISupport.swift @@ -38,6 +38,10 @@ private struct ComponentRepresenting: UIViewRepresentable { uiView.render(component: AnyComponent(component)) proxy.uiView = uiView } + + func sizeThatFits(_ proposal: ProposedViewSize, uiView: UIComponentView, context: Context) -> CGSize? { + uiView.intrinsicContentSize + } } private final class UIComponentView: UIView, ComponentRenderable {