Enumeration 列挙

PreviewLayout

A size constraint for a preview.

Declaration 宣言

enum PreviewLayout

Overview 概要

Customize the layout of a preview by providing one of these values to the previewLayout(_:) modifier. For example, you can tell the preview to take up only the amount of space that the view requires with PreviewLayout.sizeThatFits:


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

Topics 話題

Getting a Layout

See Also 参照

Preview Customization プレビューカスタマイゼーション