XCode Interface Builder 中的颜色怪异? [英] Weird colors in XCode Interface Builder?

查看:31
本文介绍了XCode Interface Builder 中的颜色怪异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在界面构建器中遇到了非常奇怪的颜色问题.我在一个 UI 元素上设置了一种颜色,例如 UIView,然后我想要在 UIButton 上使用相同的颜色……但是当我尝试这样做时,颜色通常会有所不同 - 我的意思是色调略有不同,而不是完全不同的颜色.这怎么可能???我试过使用 RGB 滑块和其他滑块,还有颜色选择器工具......有时唯一对我有帮助的是,当我创建新的 UI 元素时.有没有人遇到过同样的问题并且知道发生了什么?

I have really weird problem with colors in interface builder. I set a color on one UI element, for example UIView, and then I want the same color on UIButton...but when I try to do so, colors are often different - I mean little bit different tone, not absolutely different color. How is this even possible ??? I've tried to use RGB sliders, and other sliders, also that color picker tool... Only thing that helps me sometimes is, when I create new UI element. Anybody had the same problem and knows what's going on ?

推荐答案

默认情况下,Interface Builder 通过显示器的当前色彩空间过滤颜色.您可以在 Xcode4 IB 中更改此设置,方法是打开颜色"对话框,单击滑块"选项卡,然后单击放大镜下看起来像色谱的小下拉按钮.这将显示可用色彩空间的列表——选择通用 RGB 并根据需要调整滑块以获得正确的颜色.

Interface Builder filters colors through your monitor's current color space by default. You can change this in Xcode4 IB by bringing up a Colors dialog, clicking the Sliders tab, then clicking the little dropdown button under the magnifying glass that looks like a color spectrum. This will bring up a list of available color spaces -- select Generic RGB and adjust the sliders as necessary to get the correct color.

查看这个问题了解更多信息,尤其是对已接受答案的评论.

See this question for more information, especially the comments on the accepted answer.

这篇关于XCode Interface Builder 中的颜色怪异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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