Instance Method

previewLayout(_:)

Overrides the size of the container for the preview.

Declaration

func previewLayout(_ value: PreviewLayout) -> some View

Discussion

Default is .device.

See Also

Configuring View Previews

func previewDevice(PreviewDevice?) -> View

Overrides the device for a preview.

Beta
func previewDisplayName(String?) -> View

Provides a user visible name shown in the editor.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software