Skip to content

Implement orientation forwarding#402

Open
DominatorVbN wants to merge 3 commits into
DebugSwift:mainfrom
DominatorVbN:feature/orientation_forwarding
Open

Implement orientation forwarding#402
DominatorVbN wants to merge 3 commits into
DebugSwift:mainfrom
DominatorVbN:feature/orientation_forwarding

Conversation

@DominatorVbN

Copy link
Copy Markdown

Summary

This pull request introduces a new OrientationForwardingNavigationController to ensure that custom windows in the app (such as measurement and debug windows) properly forward orientation and rotation behaviors to match the main app's root view controller. The new navigation controller replaces standard UINavigationController instances in relevant window managers.

Orientation Handling Improvements:

  • Added a new OrientationForwardingNavigationController class that overrides rotation and orientation properties to forward them from the app's root view controller, ensuring consistent interface orientation across custom windows.

Integration into Window Managers:

  • Updated MeasurementWindowManager to use OrientationForwardingNavigationController instead of UINavigationController for its measurement window.
  • Updated WindowManager to use OrientationForwardingNavigationController instead of UINavigationController for its alert-level window.

Type of change

  • Fix
  • Feature
  • Refactor
  • Docs
  • CI/CD

Test plan

  • Unit tests updated
  • Manual testing completed
  • CI passing

Manual test steps

Screenshots / recordings (if applicable)

Checklist

  • I reviewed my own changes
  • I updated docs when needed
  • I considered backward compatibility

@DominatorVbN DominatorVbN force-pushed the feature/orientation_forwarding branch from dfbffe1 to 3940c8e Compare July 7, 2026 08:58
Overlay windows (CustomWindow, MeasurementWindow) now mirror the host
app's orientation constraints instead of rotating independently.

- Add OrientationForwardingNavigationController: delegates shouldAutorotate,
  supportedInterfaceOrientations, preferredInterfaceOrientationForPresentation,
  and prefersInterfaceOrientationLocked (iOS 26+) to the app's top VC
- Swizzle UIWindowScene.requestGeometryUpdate (iOS 16+) to trigger
  setNeedsUpdateOfSupportedInterfaceOrientations on DebugSwift windows
- Wire both overlay windows to use OrientationForwardingNavigationController
- Add orientationForwarding to DebugSwiftSwizzleFeature for opt-out support
@DominatorVbN DominatorVbN force-pushed the feature/orientation_forwarding branch from 3940c8e to be1abee Compare July 7, 2026 09:09
@MaatheusGois

Copy link
Copy Markdown
Member

@DominatorVbN can u review the CI?

@DominatorVbN

Copy link
Copy Markdown
Author

@MaatheusGois Please help adding run-ci label to check my fix against CI.

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.

3 participants