Post

Replies

Boosts

Views

Activity

Reply to app crash on show UIDocumentMenuViewController from UIWebView
I am pretty sure, the OP would have found the answer for the above problem that he is facing. This is for folks like me who were trying to solve the same problem and looking for a solution online. Whatever the OP has mentioned in the sample code should work fine. For some reason, if your app has highly complex logic and if it doesn't trigger the present(_viewControllerToPresent...), its better to write an extension on UINavigationController and put the logic there. extension UINavigationController { override open func present(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)? = nil) {				 if #available(iOS 13, *),	let webKitVC = topViewController as? WebKitViewController {						 viewControllerToPresent.popoverPresentationController?.delegate = webKitVC				 }			 super.present(viewControllerToPresent, animated: flag, completion: completion)	 } }
Sep ’20