using KVO to observe WKWebView's URL property not work in iOS 10

前端 未结 3 894
太阳男子
太阳男子 2021-01-06 02:52

I use WKWebView to load my webpage. When user click a button in webpage, my webpage will open a custom schema URL (e.g. asfle://download?media_id=1). And I use KVO to obser

3条回答
  •  被撕碎了的回忆
    2021-01-06 03:10

    I found the optional solution.I have get same problem and change this line

            webview.addObserver(self, forKeyPath: #keyPath(WKWebView.estimatedProgress), options:.new, context: nil)
    

提交回复
热议问题