From d91925f42267f49513999b306f6a5560923ba903 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 20 Nov 2025 15:50:04 +0200 Subject: [PATCH] ensure `self.maxHeight` is set --- modules/bottom-sheet/ios/SheetView.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/bottom-sheet/ios/SheetView.swift b/modules/bottom-sheet/ios/SheetView.swift index 68cf38f631..4d76ef4a03 100644 --- a/modules/bottom-sheet/ios/SheetView.swift +++ b/modules/bottom-sheet/ios/SheetView.swift @@ -73,7 +73,7 @@ class SheetView: ExpoView, UISheetPresentationControllerDelegate { required init (appContext: AppContext? = nil) { super.init(appContext: appContext) - self.maxHeight = Util.getScreenHeight() + self.maxHeight = Util.getScreenHeight() ?? UIScreen.main.bounds.height self.touchHandler = RCTTouchHandler(bridge: appContext?.reactBridge) SheetManager.shared.add(self) } @@ -126,6 +126,10 @@ class SheetView: ExpoView, UISheetPresentationControllerDelegate { return } + if let screenHeight = Util.getScreenHeight() { + self.maxHeight = screenHeight + } + let sheetVc = SheetViewController() sheetVc.setDetents(contentHeight: self.clampHeight(contentHeight), preventExpansion: self.preventExpansion) if let sheet = sheetVc.sheetPresentationController {