Class

WKHostingController

A WatchKit interface controller that hosts a SwiftUI view hierarchy. あるWatchKitインターフェイスコントローラ、それはSwiftUIビュー階層をホストします。

Declaration 宣言

class WKHostingController<Body> where Body : View

Overview 概要

A WKHostingController presents and manages your app’s main interface using SwiftUI views. You must subclass WKHostingController and override the body property to provide the set of SwiftUI views you want to display. Display the content of your hosting controller as you would any other WKInterfaceController object. For example, you can include it as one of your app’s root interface controllers, or present it modally.

Topics 話題

Creating a Hosting Controller Object ホスティングコントローラオブジェクトを作成する

Getting the Root View ルートビューを取得する

Updating the Root View ルートビューを更新する

Relationships 関係

Inherits From 継承元

See Also 参照

SwiftUI Views in WatchKit