Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Refactor code to handle multiple UIWindowScenes on iOS 16.0 and above #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bhpramit
Copy link

This pull request refactors the code to handle multiple UIWindowScenes on iOS 16.0 and above. The previous implementation assumed that there was only one UIWindowScene, that too on the zeroth index of the connectedScene array, which could lead to errors if multiple scenes were present (e.g. CarplayScene)

The new implementation uses a for loop to iterate over all connected UIWindowScenes and checks if each scene is an instance of UIWindowScene class before creating and applying the geometry preferences. This ensures that the code handles all connected UIWindowScenes correctly on iOS 16.0 and above.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant