Skip to content

Fix rotation lock#179

Open
PedroCavaleiro wants to merge 2 commits intolucaszischka:mainfrom
PedroCavaleiro:fix-rotation-lock
Open

Fix rotation lock#179
PedroCavaleiro wants to merge 2 commits intolucaszischka:mainfrom
PedroCavaleiro:fix-rotation-lock

Conversation

@PedroCavaleiro
Copy link

@PedroCavaleiro PedroCavaleiro commented Aug 27, 2025

Detect orientation lock settings from the app bundle and uses this information to refine how the bottom sheet width is calculated on iPhones in landscape mode. The main improvement is that the bottom sheet will only use 40% of the width in iPhone landscape if the orientation lock is either unlocked or set to landscape-only, ensuring better adaptation to app orientation constraints.

Orientation lock detection:

  • Added new file OrientationHelper.swift with the bundleOrientationLock() function, which reads the app's supported interface orientations from the bundle and determines if the orientation is portrait-only, landscape-only, or unlocked.

Bottom sheet width calculation refinement:

  • Updated the iPhone landscape width calculation in BottomSheetView+Calculations.swift to only apply the 40% width rule if the orientation lock is unlocked or landscape-only, improving compatibility with apps that restrict orientation.

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