Skip to content

Conversation

watt
Copy link
Collaborator

@watt watt commented May 13, 2025

Adds a bunch of optional methods to the ObservableScreen protocol to customize view controller behavior:

  • preferredStatusBarStyle
  • prefersStatusBarHidden
  • preferredStatusBarUpdateAnimation
  • supportedInterfaceOrientations
  • preferredScreenEdgesDeferringSystemGestures
  • prefersHomeIndicatorAutoHidden
  • pressesBegan
  • accessibilityPerformEscape

Checklist

  • Unit Tests
  • UI Tests
  • Snapshot Tests (iOS only)
  • I have made corresponding changes to the documentation

@watt watt force-pushed the awatt/observable-screen-options branch from b3a0c77 to 13225a8 Compare May 14, 2025 00:34
@watt watt force-pushed the awatt/observable-screen-options branch from 13225a8 to 898e3f0 Compare May 14, 2025 00:39
@watt watt marked this pull request as ready for review May 14, 2025 01:00
@watt watt requested review from a team as code owners May 14, 2025 01:00
/// (`setNeedsUpdateOfSupportedInterfaceOrientations()`), and rotates to a supported interface orientation if the
/// associated `view.window?.rootViewController?.supportedInterfaceOrientations` mask does not contain match the
/// current `windowScene` orientation.
public func setNeedsUpdateOfSupportedInterfaceOrientationsAndRotateIfNeeded() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implementation copied verbatim from MarketScreen

Copy link
Contributor

@johnnewman-square johnnewman-square left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Lots of new customization knobs here.

Co-authored-by: johnnewman-square <[email protected]>
@watt watt enabled auto-merge (squash) May 22, 2025 21:48
Copy link
Contributor

@kyleve kyleve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@watt watt merged commit e3a157c into main May 22, 2025
8 checks passed
@watt watt deleted the awatt/observable-screen-options branch May 22, 2025 21:53
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