SFSafariViewController

SFSafariViewController

本文介绍了更改SFSafariViewController的tintcolor?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说;在iOS 9中,SFSafariViewController如何改变新产品的整体色彩?

As the title says; how does one change the overall tint color of the new, in iOS 9, SFSafariViewController?

推荐答案

iOS 10的一些消息:现在,我们具有两个属性来控制SFSafariViewController

Some news from iOS 10: now we have two properties to control the overall looks of the SFSafariViewController

来源:链接

当然,唯一的缺点是它不适用于较早的版本.

The only downside is, of course, it's not available for older versions.

if #available(iOS 10.0, *) {
    safariVC.preferredBarTintColor = .black
    safariVC.preferredControlTintColor = .white
} else {
    safariVC.view.tintColor = .someColor
}

这篇关于更改SFSafariViewController的tintcolor?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 09:55