将自定义调色板添加到XCode Interface Builder [英] Add a custom color palette to XCode Interface Builder

查看:223
本文介绍了将自定义调色板添加到XCode Interface Builder的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前的长期项目使用了一系列自定义颜色。在代码中,我们使用类别按名称访问这些颜色。这很好用但有时候,例如构建一个笔尖时,这些颜色不会以编程方式设置。

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中创建和编辑调色板,然后与您的团队共享本文包含所有详情: http://natashatherobot.com/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: http://natashatherobot.com/xcode-color-palette/

这篇关于将自定义调色板添加到XCode Interface Builder的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆