如何在 iOS 中的 xib 中设置十六进制颜色代码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28701540/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 04:57:57  来源:igfitidea点击:

How to set Hex color code in xib in iOS

iosxcodexib

提问by iOS

I am not finding an option for Hex color code in xib color picker in xcode.

我没有在 xcode 的 xib 颜色选择器中找到十六进制颜色代码的选项。

But I have seen in stack over flow answer, https://stackoverflow.com/a/27283783/4391112.

但我在堆栈溢出答案中看到过, https://stackoverflow.com/a/27283783/4391112

In this, image is having Hex color code option in color picker.

在此,图像在颜色选择器中具有十六进制颜色代码选项。

Xcode version : 6.1.1

Xcode 版本:6.1.1

How can i get that hex color code in color picker in xib.

我怎样才能在 xib 的颜色选择器中获得十六进制颜色代码。

Please suggest me.

请建议我。

Thanks

谢谢

Update: Is there any plugin for xcode to select color in hexa color code. I am using xcode 6.1.1.

更新:xcode 是否有任何插件可以在 hexa 颜色代码中选择颜色。我正在使用 xcode 6.1.1。

or is there any setting in xcode to change the colr in hexa code.

或者 xcode 中是否有任何设置可以更改 hexa 代码中的颜色。

please help me guys

请帮帮我伙计们

回答by Jitendra

Select Color Picker From Xib , then choose the RGB Slider from second option Color Slider , now you can Enter HEX color (Below RGB Slider) Codes or Select RGB Values from Sliders.

从 Xib 中选择颜色选择器,然后从第二个选项 Color Slider 中选择 RGB Slider,现在您可以输入 HEX 颜色(在 RGB 滑块下方)代码或从滑块中选择 RGB 值。

enter image description here

在此处输入图片说明

回答by Roger Perez

xcode version 11.x

xcode 版本 11.x

Within the view controller,

在视图控制器中,

  • click on custom for background.
  • Click on the 3 line rgb sliders tab
  • Click Grayscale slider
  • Choose RGB Sliders
  • 单击自定义background
  • 单击 3 行 rgb 滑块选项卡
  • 点击 Grayscale slider
  • 选择 RGB Sliders

xcode version 11.4.1

Xcode 版本 11.4.1

enter image description here

在此处输入图片说明