我可以更改Chromecast导航栏的背景颜色吗?

问题描述 投票:1回答:2

我已经查看了GoogleCast v3 SDK中提供的自定义样式,除非我缺少某些内容,否则我看不到任何更改deviceChooser的backgroundColor的方法。见下文:

enter image description here

有什么办法改变这种灰色?

ios swift chromecast
2个回答
2
投票

Google cast sdk使用正常的UINavigationBar。您可以在推送到sdk的媒体控件UI之前更改导航栏的外观。

我在didFinishLaunchingWithOptions中尝试过

 [UINavigationBar appearance].barTintColor = [UIColor whiteColor];
 [UINavigationBar appearance].translucent = NO;

希望有帮助:)

worked for me


0
投票

您可以使用GCKUIStyle设置所有GCK视图的样式,

例如:

GCKUIStyle.sharedInstance().castViews.mediaControl.miniController.buttonTextColor = .black

GCKUIStyle.sharedInstance().apply()

根据您的情况,可以用此行设置导航样式

connectionController.navigation.buttonTextColor = UIColor.black

检查此URL以获取更多信息:

https://developers.google.com/cast/docs/ios_sender/customize_ui

© www.soinside.com 2019 - 2024. All rights reserved.