Contents

InterfaceOrientation

The orientation of the interface from the user’s perspective.

Declaration

struct InterfaceOrientation

Overview

By default, device previews appear right side up, using orientation portrait. You can change the orientation with a call to the previewInterfaceOrientation(_:) modifier:

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

Topics

Getting an orientation

See Also

Customizing a preview