简体   繁体   中英

how do I disable canOpenURL? I don't want my UIWebView to open up the official app

Is there a way to disable the url scheme in iOS?

My app has a UIWebView that opens up a certain website. If the user has the official app installed it opens it up and breaks my workflow.

What can I do?

I believe you can use a UIWebViewDelegate to listen for:

webView:shouldStartLoadWithRequest:navigationType:

Return NO for those URLs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM