Enumeration 列挙

PreviewPlatform

Platforms that can run the preview.

Declaration 宣言

enum PreviewPlatform

Overview 概要

Xcode infers the platform for a preview based on the currently selected target. If you have a multiplatform target and want to suggest a particular target for a preview, implement the platform computed property as a hint, and specify one of the preview platforms:


struct CircleImage_Previews: PreviewProvider {
    static var previews: some View {
        CircleImage()
    }


    static var platform: PreviewPlatform? {
        PreviewPlatform.tvOS
    }
}

Topics 話題

Getting an Operating System

Comparing Preview Platforms プレビュープラットホームを比較する

Default Implementations 省略時実装

Relationships 関係

Conforms To 次に準拠

See Also 参照

Preview Creation プレビュー作成