I found another possible reason for this error.
In viewControllerForLocation, I created an instance of the view controller to show ...
func previewingContext(_ previewingContext: UIViewControllerPreviewing, viewControllerForLocation location: CGPoint) -> UIViewController? { let vc = VCImageFullScreen.loadView() return vc }
... but this ViewController had the wrong super call in its DidAppear view:
class VCImageFullScreen : UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewWillAppear(animated)
After fixing this problem, everything worked as expected.
Hixfield
source share