Use sheetPresentationController property

This commit is contained in:
Shadowfacts 2021-06-26 17:02:17 -04:00
parent 0a16a2e261
commit c22945b1e7
1 changed files with 2 additions and 2 deletions

View File

@ -249,9 +249,9 @@ extension ComposeHostingController: ComposeUIStateDelegate {
if #available(iOS 15.0, *) {
let picker = AssetPickerViewController()
picker.assetPickerDelegate = self
picker.modalPresentationStyle = .popover
picker.modalPresentationStyle = .pageSheet
picker.overrideUserInterfaceStyle = .dark
let sheet = picker.popoverPresentationController!.adaptiveSheetPresentationController
let sheet = picker.sheetPresentationController!
sheet.detents = [.medium(), .large()]
sheet.prefersEdgeAttachedInCompactHeight = true
self.present(picker, animated: true)