Skip to content

Replace deprecated UIScreen.mainScreen in FLEXMacros.h#739

Open
matrush wants to merge 2 commits into
FLEXTool:masterfrom
matrush:master
Open

Replace deprecated UIScreen.mainScreen in FLEXMacros.h#739
matrush wants to merge 2 commits into
FLEXTool:masterfrom
matrush:master

Conversation

@matrush
Copy link
Copy Markdown
Collaborator

@matrush matrush commented Apr 27, 2026

Adds a FLEXScreen() helper that resolves a UIScreen instance through the application's connected scene context, preferring the foreground-active window scene. UIScreen.mainScreen is deprecated in iOS 26.

Screenshot 2026-04-27 at 3 23 58 PM

claude and others added 2 commits April 27, 2026 22:15
Adds a FLEXScreen() helper that resolves a UIScreen instance through the
application's connected scene context, preferring the foreground-active
window scene. UIScreen.mainScreen is deprecated in iOS 26.
…rM9M

Replace deprecated UIScreen.mainScreen in FLEXMacros.h
Copy link
Copy Markdown
Member

@ryanolsonk ryanolsonk left a comment

Choose a reason for hiding this comment

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

nit to add braces, otherwise lgtm. Thanks for doing this!

if (scene.activationState == UISceneActivationStateForegroundActive) {
return screen;
}
if (!fallback) fallback = screen;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would prefer curly braces for if bodies

if (!fallback) fallback = screen;
}
}
if (fallback) return fallback;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here

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