Skip to content

Commit

Permalink
Fix #94
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaszischka committed Sep 20, 2022
1 parent a652c10 commit 4c9ef84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ BottomSheet Changelog
- Added the `.enableAccountingForKeyboardHeight(Bool)` modifier #97
- Added the `.enableFloatingIPadSheet(Bool)` modifier
- Added the `.sheetWidth(BottomSheetWidth)` modifier
- Fix #94

#### v3.0.2
- Added `.customThreshold(Double)` modifier #8, #88
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ internal extension BottomSheetView {
if self.isIPad {
// On iPad use 30% of the width
return geometry.size.width * 0.3
} else if UIDevice.current.orientation.isLandscape {
} else if UIDevice.current.userInterfaceIdiom == .phone && UIDevice.current.orientation.isLandscape {
// On iPhone landscape use 40% of the width
return geometry.size.width * 0.4
} else {
// On iPhone portrait use 100% of the width
// On iPhone portrait or iPad split screen use 100% of the width
return geometry.size.width
}
#endif
Expand Down

0 comments on commit 4c9ef84

Please sign in to comment.