Ios 更改google cast视图的导航栏和取消按钮

Ios 更改google cast视图的导航栏和取消按钮,ios,swift,iphone,google-cast,google-cast-sdk,Ios,Swift,Iphone,Google Cast,Google Cast Sdk,我已经在我的项目中实现了GoogleCast框架,并开始对GoogleCast视图进行主题化 目前我有一段代码: let castStyle = GCKUIStyle.sharedInstance() //DeviceChooser castStyle.castViews.deviceControl.deviceChooser.backgroundColor = theme.googleCastDeviceChooserBackgroundColor castStyle.castViews.d

我已经在我的项目中实现了GoogleCast框架,并开始对GoogleCast视图进行主题化

目前我有一段代码:

let castStyle = GCKUIStyle.sharedInstance()

//DeviceChooser
castStyle.castViews.deviceControl.deviceChooser.backgroundColor = theme.googleCastDeviceChooserBackgroundColor
castStyle.castViews.deviceControl.deviceChooser.iconTintColor = theme.googleCastDeviceChooserIconTintColor
castStyle.castViews.deviceControl.deviceChooser.headingTextColor = theme.googleCastDeviceChooserHeadingTextColor
castStyle.castViews.deviceControl.deviceChooser.captionTextColor = theme.googleCastDeviceChooserCaptionTextColor
castStyle.castViews.deviceControl.deviceChooser.headingTextFont = theme.googleCastDeviceChooserHeadingTextFont
castStyle.castViews.deviceControl.deviceChooser.captionTextFont = theme.googleCastDeviceChooserCaptionTextFont

UINavigationBar.appearance().barTintColor = theme.googleCastNavigationBarBackgroundColor
UINavigationBar.appearance().isTranslucent = false
UINavigationBar.appearance().tintColor = UIColor.red
UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.foregroundColor: theme.googleCastNavigationBarIconTintColor]
UIBarButtonItem.appearance().setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.green], for: .normal)
UIBarButtonItem.appearance().setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.red], for: .selected)

castStyle.apply()
我对devicechooser的样式仍有一些问题:

  • 导航栏取消按钮未更改颜色 -->导航栏的背景颜色已更改为正确的颜色

  • 似乎找不到设置tableview分隔符颜色样式的方法