gpt4 book ai didi

ios - 隐藏 sfsafariviewcontroller 中的控件

转载 作者:行者123 更新时间:2023-11-28 13:32:57 25 4
gpt4 key购买 nike

let sfViewController  = SFSafariViewController(url: url)
sfViewController.delegate = self

self.ViewC!.present(sfViewController, animated: false, completion: nil)

我正在我的应用程序中打开 SFSafariViewController。但是出于安全问题,我不想要这个 View 给出的控件。此 View 提供诸如完成、刷新、共享、在 Safari 中打开之类的操作。

为了我的目的,我只想要 Action- Done。其他操作不应该对用户可见。我支持 ios 10.0 + 。至少那个工具栏不应该在那里。可以这样做吗?

最佳答案

不,您不能自定义 SFSafariViewController 。

苹果说:

Important

In accordance with App Store Review Guidelines, this view controller must be used to visibly present information to users; the controller may not be hidden or obscured by other views or layers. Additionally, an app may not use SFSafariViewController to track users without their knowledge and consent.

最后,实际上,您可以使用 WKWebView 来进一步自定义您的屏幕。

If your app lets users view websites from anywhere on the Internet, use the SFSafariViewController class. If your app customizes, interacts with, or controls the display of web content, use the WKWebView class.

阅读文档:https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller

关于ios - 隐藏 sfsafariviewcontroller 中的控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57074487/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com