associatedtype Body : Scene
The type of scene representing the content of the app.
アプリの内容を表しているシーンの型。
Availability 有効性
Technology
var body: Self.Body { get }
For any app that you create, provide a computed body
property that defines your app’s scenes, which are instances that conform to the Scene
protocol. For example, you can create a simple app with a single scene containing a single view:
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
Text("Hello, world!")
}
}
}
Swift infers the app’s Body
associated type based on the scene provided by the body
property.
associatedtype Body : Scene