Force SFSafariViewController to load the desktop version of a website

…衆ロ難τιáo~ 提交于 2021-01-28 20:41:06

问题


As the title suggests, I was wondering if there is a way to force SFSafariViewController to load the desktop version of a website.

Thanks


回答1:


As of iOS 9, sadly no. Your best bet might be to create your own web view and use a different user agent as @vizllx suggests in the comments.




回答2:


You can use WKWebView and then set the customUserAgent property of the web view to any desktop browser user-agent.



来源:https://stackoverflow.com/questions/35130073/force-sfsafariviewcontroller-to-load-the-desktop-version-of-a-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!