0

How can I change tintColor and barTintColor on the SafariVC that is presented when using SFAuthenticationSession ?

I tried to change UINavigationBar and UIToolBar and UIBarButtonItem appearance but it doesn't respect them.

Thanks

4

1 回答 1

0

API不支持更改 SFAuthenticationSession 中使用的 Safari 视图控制器的 tintColor 和 barTintColor 。

我认为逻辑是您的 OAuth 身份验证应该是与您的应用程序不同的过程,这对用户来说应该是显而易见的(来自文档):

如果应用程序使用 SFAuthenticationSession,则会通过对话框提示用户明确同意,从而允许应用程序访问 Safari 中的网站数据。呈现网页时,它在单独的进程中运行,因此可以保证用户和 Web 服务应用程序无法访问用户的凭据。相反,应用程序会获得一个唯一的身份验证令牌。

PS SFAuthenticationSession 在 iOS 12 中已被弃用,取而代之的是ASWebAuthenticationSession。API 非常相似,因此对自定义没有太大帮助。

于 2018-06-26T12:36:50.643 回答