2

In XCode 4.2, I want to set a view's background colour to a particular RGB value. However, I don't appear to have the "RGB Sliders" option that I used to have (perhaps in a previous version). I'm looking for something like the dialog shown in this answer to another question, but all I've got is this:

XCode 4.2 colour chooser

There are no other options in the drop-down that says "Spectrum". Does anyone know if/how I can get XCode to accept RGB or hex values?

Community
  • 1
  • 1
Dan Dyer
  • 53,737
  • 19
  • 129
  • 165

2 Answers2

6

I figured it out:

  1. Click on the button on the top right of the title bar to reveal the toolbar.

  2. Click on the sliders icon.

How to expand the colour dialog

Seems obvious in hindsight, but if you don't know then you don't know.

Dan Dyer
  • 53,737
  • 19
  • 129
  • 165
0

You can build an RGB color programmatically using the UIColor method colorWithRed:green:blue:alpha:, then just set it to the view's backgroundColor property. I know this isn't the graphical solution you were looking for, but it's somewhat of a workaround.

Tim
  • 59,527
  • 19
  • 156
  • 165
  • Thanks, was hoping to avoid doing that. It should be (and previously was) possible to enter the colour into Interface Builder. – Dan Dyer Feb 18 '12 at 16:37