XCode界面生成器中的奇怪的颜色? [英] Weird colors in XCode Interface Builder?

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

问题描述

我在界面生成器中的颜色真的很奇怪的问题。我在一个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界面生成器中的奇怪的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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