Return Value 戻り値
A preview that uses the given orientation.
Availability 有効性
Technology
func previewInterfaceOrientation(_ value: InterfaceOrientation
) -> some View
A preview that uses the given orientation.
value
An orientation to use for preview.
By default, device previews appear right side up, using orientation portrait
. You can change the orientation of a preview using one of the values in the Interface
structure:
struct CircleImage_Previews: PreviewProvider {
static var previews: some View {
CircleImage()
.previewInterfaceOrientation(.landscapeRight)
}
}