In my watch app, after presenting a controller with presentControllerWithNames:contexts:
, is it possible to change the color of the title in the status bar? For example, in Apple's WatchKit Catalogue sample they have a controller they present modally with "Dismiss" set as the title. In storyboard, the title for this controller appears to have the global tint applied to it, but when running the app in the simulator, the color defaults to white.
在我的监视应用程序中,在使用presentControllerWithNames:contexts:呈现控制器后,是否可以更改状态栏中标题的颜色?例如,在Apple的WatchKit Catalog样本中,他们有一个控制器,它们以模态方式呈现,并将“Dismiss”设置为标题。在故事板中,此控制器的标题似乎应用了全局色调,但在模拟器中运行应用程序时,颜色默认为白色。
If possible, how can I make a presented WatchKit controller respect the global tint color?
如果可能,我如何使一个呈现的WatchKit控制器尊重全局色调?
edit: Attaching a screenshot for clarity.
编辑:为了清晰起见附加截图。
3 个解决方案
#1
15
Yes, Global Tint is the answer.
是的,Global Tint就是答案。
- go to storyboard file
- 转到故事板文件
- select the interface controller desired to be colored
- 选择希望着色的接口控制器
- click 'Utilities'
- 点击'公用事业'
- click 'File Inspector'
- 点击'文件检查器'
- Find 'Global Tint', then use 'RGB sliders' under 2nd Tab of the Color pane
- 找到“全局色调”,然后在“颜色”窗格的“第二个”选项卡下使用“RGB滑块”
#2
7
With the current WatchKit SDK, the global tint color does not apply on the WKInterfaceControllers title that are presented modally. I am not sure if this is a bug in the beta version or a feature... I hope Apple will fix this.
使用当前的WatchKit SDK,全局色调颜色不适用于以模态方式呈现的WKInterfaceControllers标题。我不确定这是测试版或功能中的错误...我希望Apple能解决这个问题。
#3
0
It is possible to change the global tint color. You can change the global color in the "Show the File Inspector" Storyboard.
可以更改全局色调颜色。您可以在“显示文件检查器”故事板中更改全局颜色。
Sorry I don't have the 10 reputation points required to post a screenshot. ^^
对不起,我没有发布截图所需的10个声望点。 ^^
#1
15
Yes, Global Tint is the answer.
是的,Global Tint就是答案。
- go to storyboard file
- 转到故事板文件
- select the interface controller desired to be colored
- 选择希望着色的接口控制器
- click 'Utilities'
- 点击'公用事业'
- click 'File Inspector'
- 点击'文件检查器'
- Find 'Global Tint', then use 'RGB sliders' under 2nd Tab of the Color pane
- 找到“全局色调”,然后在“颜色”窗格的“第二个”选项卡下使用“RGB滑块”
#2
7
With the current WatchKit SDK, the global tint color does not apply on the WKInterfaceControllers title that are presented modally. I am not sure if this is a bug in the beta version or a feature... I hope Apple will fix this.
使用当前的WatchKit SDK,全局色调颜色不适用于以模态方式呈现的WKInterfaceControllers标题。我不确定这是测试版或功能中的错误...我希望Apple能解决这个问题。
#3
0
It is possible to change the global tint color. You can change the global color in the "Show the File Inspector" Storyboard.
可以更改全局色调颜色。您可以在“显示文件检查器”故事板中更改全局颜色。
Sorry I don't have the 10 reputation points required to post a screenshot. ^^
对不起,我没有发布截图所需的10个声望点。 ^^