我在应用程序中启动 Safari,并希望在按完成后执行我的代码。但该功能func safariViewControllerDidFinish
不会进入。
import SafariServices
class QRScannerController: UIViewController, WKNavigationDelegate, SFSafariViewControllerDelegate {
let vc = SFSafariViewController (url: URL(string: String(urls))!)
present(vc, animated: true, completion: nil)
vc.delegate = self
func safariViewControllerDidFinish(_ controller: SFSafariViewController) {
controller.dismiss(animated: true) {
// do my code
}