diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d9debbe2..5857a655e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Sources/BottomSheet/BottomSheetView/BottomSheetView+Calculations.swift b/Sources/BottomSheet/BottomSheetView/BottomSheetView+Calculations.swift index a267a2dc6..76b859be1 100644 --- a/Sources/BottomSheet/BottomSheetView/BottomSheetView+Calculations.swift +++ b/Sources/BottomSheet/BottomSheetView/BottomSheetView+Calculations.swift @@ -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