errors encountered while discove

2019-01-02  本文已影响0人  华子1889

webview选择相册图片的问题,在viewwillappear中reload了导致错误。

[discovery] errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}
I've been having this problem because I also had my webView.load(urlRequest); in viewDidAppear.
As you mentioned, you need to add the webView.load(urlRequest); **only in viewDidLoad.
The reason is because calling the Library or Camera will open up the OS dialog to pick or take a photo, and once you are done doing that, your ViewController will call again the viewWillAppear and viewDidAppear callbacks and that will re-trigger your initial webview load (refreshing the page).

上一篇下一篇

猜你喜欢

热点阅读