本文介绍了更改NSWindow标题栏的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发一个桌面应用程序,其中我想更改NSWindow的标题栏的颜色。
I am developing a desktop application in which I want to change the color of the title bar of an NSWindow. How exactly can I do this?
推荐答案
要更改窗口工具栏的颜色:
To change the color of the window's toolbar:
- 在属性检查器中设置窗口样式纹理。
- 在代码中:
[window setBackgroundColor:MyCustomColor];
- Set window style Textured in Attribute inspector.
- In code:
[window setBackgroundColor: MyCustomColor];
这篇关于更改NSWindow标题栏的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!