Instance Method インスタンスメソッド

updateUIViewController(_:context:)

Updates the state of the specified view controller with new information from SwiftUI. 指定されたビューコントローラの状態をSwiftUIからの新しい情報で更新します。

Declaration 宣言

func updateUIViewController(_ uiViewController: Self.UIViewControllerType, context: Self.Context)

Parameters パラメータ

uiViewController

Your custom view controller object. あなたのあつらえのビューコントローラオブジェクト。

context

A context structure containing information about the current state of the system. システムの現在の状態についての情報を含んでいる前後関係構造体。

Discussion 議論

When the state of your app changes, SwiftUI updates the portions of your interface affected by those changes. SwiftUI calls this method for any changes affecting the corresponding AppKit view controller. あなたのアプリの状態が変化する時、SwiftUIはそれら変化によって影響されるあなたのインターフェイスの各部を更新します。SwiftUIは、このメソッドを、対応するAppKitビューコントローラに影響を及ぼすあらゆる変化に対して呼び出します。 Use this method to update the configuration of your view controller to match the new state information provided in the context parameter.

See Also 参照

Creating and Updating the View Controller ビューコントローラを作成および更新する