将自定义调色板添加到XCode Interface Builder

编程入门 行业动态 更新时间:2024-10-23 11:21:37
本文介绍了将自定义调色板添加到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中创建和编辑调色板,然后与您的团队共享本文包含所有详情: 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

本文发布于:2023-11-08 20:43:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1570406.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:调色板   自定义   XCode   Interface   Builder

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!