.previewLayout(.fixed(width: 480, height: 320)) has no effect in Xcode 13.4 and Xcode 14 beta 3
Asked
Active
Viewed 152 times
1 Answers
1
To make it clear here, you did not actually set your preview
in landscape mode. Two solutions for your problem:
- You actually requested the preview to be in a fixed size window, so to make this work, you need to choose
Selectable
in the canvas window to preview in a fixed sized window. I have drawn a red line around that part in the attached image. (code and image are below)
FContentView() //fixed size window
.previewLayout(.fixed(width: 480, height: 320))
- If you want to actually preview in a landscape mode, use
.previewInterfaceOrientation(.landscapeLeft)
or right. You can choose either live / selectable. (code and image are below)
FContentView() //real landscape view
.previewInterfaceOrientation(.landscapeLeft)

Steven-Carrot
- 2,368
- 2
- 12
- 37