UIHostingView

Swift

@available(iOS 13.0, *)
open class UIHostingView<Content> : UIView where Content : View

A UIView subclass capable of hosting a SwiftUI view.

  • Undocumented

    Declaration

    Swift

    public var rootView: Content { get set }
  • Undocumented

    Declaration

    Swift

    public required init(rootView: Content)
  • Undocumented

    Declaration

    Swift

    public required init?(coder: NSCoder)
  • Undocumented

    Declaration

    Swift

    override open func sizeThatFits(_ size: CGSize) -> CGSize
  • Undocumented

    Declaration

    Swift

    override open func systemLayoutSizeFitting(_ targetSize: CGSize) -> CGSize
  • Undocumented

    Declaration

    Swift

    override open func systemLayoutSizeFitting(
        _ targetSize: CGSize,
        withHorizontalFittingPriority horizontalFittingPriority: UILayoutPriority,
        verticalFittingPriority: UILayoutPriority
    ) -> CGSize
  • Undocumented

    Declaration

    Swift

    override open func sizeToFit()