r/iOSProgramming • u/6thDAY • Oct 28 '26
Question Lock app in landscape orientation for iPhone Duo?
I'm finding it difficult to lock my app in landscape mode, i.e. wide-view. I don't want my app to rotate rotation to portrait when the device is rotated. But every time I rotate the simulator to tall-view, i.e. portrait, the app orientation rotates, causing the contents to get squished.
Is this not possible with the Duo, and another view I'm gonna have to support?
4
Oct 28 '26
[removed] — view removed comment
2
u/6thDAY Oct 28 '26
Oh interesting, thanks for that! I was banging my head trying to figure out why my code keeps failing. Glad I didn’t continue to keep wasting my time!
1
Oct 30 '26
[removed] — view removed comment
1
u/AutoModerator Oct 30 '26
Hey /u/Great_Host7361, your content has been removed because Reddit has marked your account as having a low Contributor Quality Score. This may result from, but is not limited to, activities such as spamming the same links across multiple subreddits, submitting posts or comments that receive a high number of downvotes, a lack of recent account activity, or having an unverified account.
Please be assured that this action is not a reflection of your participation in our subreddit. This is simply an automated filter in place to reduce spam.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
0
Oct 28 '26
[removed] — view removed comment
2
u/jonnysunshine1 Oct 28 '26
Pretty sure iOS27 ignores requires fullscreen and maybe the supported interface orientations too
2
u/GlebKhamin Oct 29 '26
Short answer: on the inner display you can’t lock it, so yes, it’s another layout you’ll have to support.
I ran into the same thing while adapting my app. From Apple’s Duo tech talks:
The inner display ignores
UISupportedInterfaceOrientations, so your orientation lock just doesn’t apply there. The outer display still honors it like a normal iPhone.UIRequiresFullScreendoesn’t save you either: it’s honored, but the app still gets resized on fold/unfold.On top of that, every app takes part in Split View on the inner display, so you can end up at widths that are neither “portrait” nor “landscape”.
What worked for me is to stop thinking in orientations and lay out by available size / size classes instead. On the inner display you get regular/regular in both 951×669 (wide) and 669×951 (tall). So the trick is to decide the layout by the actual width and height of your view, and switch between something like a two-column layout when it’s wide and a stacked layout when it’s tall. Nothing gets squished, because you’re not stretching one layout into both shapes.
Apple’s “Prepare your app for iPhone Duo” tech talk covers this, worth a watch.