我目前的长期项目使用了一系列自定义颜色。在代码中,我们使用类别按名称访问这些颜色。这很好用但有时候,例如构建一个笔尖时,这些颜色不会以编程方式设置。
My current long term project utilizes a palette of custom colors. In code, we are using a category to access these colors by name. This works great but there are times, such as when building a nib, that these colors won't be set programmatically.
我正在寻找一种方法来定义命名一组颜色。例如,在为UIView设置背景颜色时,我希望Interface Builder中的下拉列表按名称列出我的自定义颜色。有谁知道实现这一目标的方法?谢谢!
I am looking for a way to define a named set of colors. For instance, when setting a background color for a UIView, I would like my drop list in Interface Builder to list my custom colors by name. Does anyone know of a way to achieve this? Thanks!
推荐答案是的,您可以在IB中创建和编辑调色板,然后与您的团队共享本文包含所有详情: natashatherobot/xcode-color-palette/
Yes, you can create and edit a palette in IB and then share it with your team This article has all the details: natashatherobot/xcode-color-palette/
更多推荐
将自定义调色板添加到XCode Interface Builder
发布评论