UIHostingController

open class UIHostingController : UIViewController

A UIKit view controller that manages a ArgoKit view hierarchy.

Example:

     class AppDelegate: UIResponder, UIApplicationDelegate {

         var window: UIWindow?

         func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
             // Override point for customization after application launch.

             let rootVC = UIHostingController(rootView: RootView())
             let window = UIWindow.init(frame: UIScreen.main.bounds)
             window.rootViewController = rootVC
             self.window = window
             window.makeKeyAndVisible()

             return true
         }
     }
  • Initializer

    Declaration

    Swift

    public init(rootView: View, useSafeArea: Bool = false)

    Parameters

    rootView

    The root view of the ArgoKit view hierarchy that you want to manage using the hosting view controller.

    safeArea

    ture if you want to add the insets that you use to determine the safe area for this view.

  • Initializer

    Declaration

    Swift

    public init?(coder aDecoder: NSCoder, rootView: View, useSafeArea: Bool = false)

    Parameters

    aDecoder

    An unarchiver object.

    rootView

    The root view of the ArgoKit view hierarchy that you want to manage using the hosting view controller.

    safeArea

    ture if you want to add the insets that you use to determine the safe area for this view.

  • Undocumented

    Declaration

    Swift

    required public init?(coder: NSCoder)
  • Undocumented

    Declaration

    Swift

    public var useSafeAreaTop: Bool? { get set }
  • Undocumented

    Declaration

    Swift

    public var useSafeAreaLeft: Bool? { get set }
  • Undocumented

    Declaration

    Swift

    public var useSafeAreaBottom: Bool? { get set }
  • Undocumented

    Declaration

    Swift

    public var useSafeAreaRight: Bool? { get set }
  • Undocumented

    Declaration

    Swift

    open override func viewDidLoad()
  • Undocumented

    Declaration

    Swift

    open override func viewDidDisappear(_ animated: Bool)
  • Undocumented

    Declaration

    Swift

    open override func viewDidLayoutSubviews()