[iOS18] QLPreviewController - No more swipe to dismiss?

Have the requirements to support swipe to dismiss from a quick-look view controller changed in iOS18? I am noticing that my app no longer supports gestural dismissal in an iOS18 build.

Not this is a QLPreviewController presented from a UIViewController presented in a SwiftUI view hierarchy as part of a ViewControllerRepresentable.

Answered by J0hn in 800817022

Workaround: Assign a delegate and implement:

func previewController(_ controller: QLPreviewController, transitionViewFor item: QLPreviewItem) -> UIView? {
    UIView()
}

If anyone at Apple would like this fixed, please file a radar.

Accepted Answer

Workaround: Assign a delegate and implement:

func previewController(_ controller: QLPreviewController, transitionViewFor item: QLPreviewItem) -> UIView? {
    UIView()
}

If anyone at Apple would like this fixed, please file a radar.

Thanks @J0hn but I noticed this creates a little white view during dismissal. I've done this for now so when you drag you still see the preview's view.


func previewController(_ controller: QLPreviewController, transitionViewFor item: any QLPreviewItem) -> UIView? {
        if controller.isBeingDismissed {
            return controller.view
        }
        return nil
    }
[iOS18] QLPreviewController - No more swipe to dismiss?
 
 
Q