Skip to content

Add experimental screen orientation setting for iPhone - #581

Open
JaeyeongYang wants to merge 1 commit into
rileytestut:mainfrom
JaeyeongYang:feature-screen-orientation
Open

JaeyeongYang wants to merge 1 commit into
rileytestut:mainfrom
JaeyeongYang:feature-screen-orientation

Conversation

@JaeyeongYang

@JaeyeongYang JaeyeongYang commented Nov 15, 2026 •

Copy link
Copy Markdown

Mark the type contribution you are making:

  • Experimental feature (new functionality that can be selectively enabled/disabled)
  • Bug fix (non-breaking change which fixes an issue)

Description

Summary of your changes, including:

  • Why is this change necessary?

    Delta rotates with the device, but it has no in-app setting to choose and keep a specific orientation. I wanted to keep the screen in portrait or either landscape direction without having to hold the phone in that position.

  • Why did you decide on this solution?

    A single app-wide setting keeps the selected orientation consistent across the game library, settings, and game scenes. Using the existing @Feature and @Option system makes it opt-in and saves the choice through the app's existing settings mechanism. The feature is disabled by default; Automatic mode and disabling it preserve the existing rotation behavior.

This adds a Screen Orientation experimental feature for iPhone with four options: Automatic, Portrait, Landscape Left, and Landscape Right.

System image and document pickers retain the orientations they need, with the selected orientation policy restored when they close. External displays keep their existing behavior.

In iPad simulator testing, UIKit rejected fixed-orientation requests under Delta's current multitasking configuration, even when the app filled the screen. A separate test app could rotate with UIRequiresFullScreen enabled, but applying that setting to Delta would change its multitasking support. This PR leaves that broader app policy unchanged and labels the feature as iPhone-only.

The project file only registers the new Swift source; deployment targets, dependency lockfiles, and submodules are unchanged.

Testing

  • iPhone 18 Pro, iOS 27.2 (Simulator)
  • iPhone 15 Pro, iOS 18.5 (Simulator)
  • iPad Air 11-inch (M2), iPadOS 18.5 (Simulator)
  • iPad mini (A20 Pro), iPadOS 27.2 (Simulator)

Checklist

General (All PRs)

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I've tested my changes with different device + OS version configurations

Experimental Feature-specific

  • Added property to ExperimentalFeatures struct annotated with @Feature
  • Uses @Option's to persist all feature-related data
  • Locked all behavior changes behind ExperimentalFeatures.shared.[feature].isEnabled runtime check
  • Isolates changes to separate files as much as possible (e.g. via Swift extensions)

@JaeyeongYang
JaeyeongYang force-pushed the feature-screen-orientation branch from 5b8781c to 0b6ff1e Compare November 17, 2026 05:40
@JaeyeongYang
JaeyeongYang force-pushed the feature-screen-orientation branch from 0b6ff1e to df890bc Compare November 17, 2026 06:09

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant