简体   繁体   English

如何在SFSafariViewController中实现隐身模式

[英]How to achieve Incognito Mode in SFSafariViewController

In the APP i'm currently working on, I need to provide user with a way to open HTML file. 在我目前正在开发的APP中,我需要为用户提供一种打开HTML文件的方法。 I'm using SFSafariViewController for that purpose. 我正在使用SFSafariViewController用于此目的。 However, it is also required that user need to be able to view HTML file in incognito mode. 但是,还要求用户需要能够以隐身模式查看HTML文件。

I did some research and find out that user can click on 'safari' icon in SFSafariViewController to open a certain HTML file in Safari APP. 我做了一些研究,发现用户可以点击SFSafariViewController 'safari'图标在Safari APP中打开某个HTML文件。 Then user can use private browsing mode of Safari as he/she always does. 然后,用户可以像往常一样使用Safari的隐私浏览模式。

However, I'm trying to figure out any way for user to use incognito or private browsing mode in SFSafariViewController ? 但是,我试图找出用户在SFSafariViewController使用隐身隐私浏览模式的任何方式?

If not, is there any alternative to SFSafariViewController which can achieve that? 如果没有,是否可以实现SFSafariViewController替代方案?

You do not have any control over SFSafariViewController in terms of customization. 在自定义方面,您无法控制SFSafariViewController Read Further for more information regarding the different ways of opening a web-page within an app. 有关在应用程序中打开网页的不同方式的详细信息,请阅读“进一步 ”。

I would suggest you to use UIWebView if you are supporting iOS versions below 8.0 and WKWebView for versions overs 8.0. 我建议你使用UIWebView如果你支持iOS版本低于8.0和WKWebView版本超过8.0。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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