fix incorrect snap point

This commit is contained in:
Hailey
2024-10-03 00:35:06 -07:00
parent 5e41b503ad
commit f5b2fe7558
+4
View File
@@ -122,8 +122,12 @@ class SheetView: ExpoView, UISheetPresentationControllerDelegate {
if let sheet = sheetVc.sheetPresentationController { if let sheet = sheetVc.sheetPresentationController {
sheet.delegate = self sheet.delegate = self
sheet.preferredCornerRadius = self.cornerRadius sheet.preferredCornerRadius = self.cornerRadius
if sheet.detents.count == 1 {
sheet.selectedDetentIdentifier = .large
} else {
self.selectedDetentIdentifier = sheet.selectedDetentIdentifier self.selectedDetentIdentifier = sheet.selectedDetentIdentifier
} }
}
sheetVc.view.addSubview(innerView) sheetVc.view.addSubview(innerView)
self.sheetVc = sheetVc self.sheetVc = sheetVc