AVPlayer 字幕选择屏幕的完成按钮始终为白色
AVPlayer Subtitle selection screen's Done button is always in white color
我们的应用程序导航栏是白色的,它是推一个viewcontroller加载WKWebview中的一些html内容,内容页面有一些视频。点击视频时,WKWebview 启动视频播放器。
在这种情况下,用户尝试更改字幕,字幕导航栏的背景颜色为白色,而此屏幕中的完成按钮也为白色(变得不可见)。
UINavigationBar.appearance().barTintColor = .green
UINavigationBar.appearance().tintColor = .red
UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.yellow]
UINavigationBar.appearance().isTranslucent = false
此主题应用于导航控制器,不适用于音频和字幕屏幕右侧的“完成”按钮。
是否有任何调整来解决这个问题?
Screenshot1
ScreenShot2
很多人提到,UINavigationBar.appearance().barTintColor 也可以改变导航项的颜色。
但下面的代码帮助我更改了“完成”按钮的颜色
UIBarButtonItem.appearance().tintColor = .green
我们的应用程序导航栏是白色的,它是推一个viewcontroller加载WKWebview中的一些html内容,内容页面有一些视频。点击视频时,WKWebview 启动视频播放器。
在这种情况下,用户尝试更改字幕,字幕导航栏的背景颜色为白色,而此屏幕中的完成按钮也为白色(变得不可见)。
UINavigationBar.appearance().barTintColor = .green
UINavigationBar.appearance().tintColor = .red
UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.yellow]
UINavigationBar.appearance().isTranslucent = false
此主题应用于导航控制器,不适用于音频和字幕屏幕右侧的“完成”按钮。
是否有任何调整来解决这个问题?
Screenshot1 ScreenShot2
很多人提到,UINavigationBar.appearance().barTintColor 也可以改变导航项的颜色。
但下面的代码帮助我更改了“完成”按钮的颜色
UIBarButtonItem.appearance().tintColor = .green