UISegmentedControl black?

Discussion in 'iOS Programming' started by GregInAZ, Aug 10, 2008.

  1. GregInAZ macrumors newbie

    Aug 2, 2008
    My navigation controller is set to black, but the UISegmenteedControl is being displayed as the default blue. Buttons I add to my navigation controller turn black, this just won't. Is there a way to make it black? I'm using IB to create the interface.
  2. GregInAZ thread starter macrumors newbie

    Aug 2, 2008
    In case anyone else runs into this, the color can be changed using the setTintColor property of the UISegmentedControl within code.
  3. PhilNash macrumors newbie

    Mar 20, 2008
    I've been doing this with my segmented view set to bar style, and I find that when tinted black the buttons don't work (don't change shade when you select them), but leaving them to the default blue tint works fine.
    Anyone else seen this/ know a workaround?
  4. Pring macrumors 6502

    Sep 17, 2003
    Bit of gravedigging, but did you ever find the solution to this? I'm having the same problem.
  5. Niiro13 macrumors 68000

    Feb 12, 2008
    The main problem is that when they're black, there's no "darker" color of black. So all the segments are the same color.

    What you can do is imagine how it would look. Then go and make your segmented control dark gray :p.

    To the OP, there's no way to tint them in IB which is really weird. You'd have to do it programatically through the tintColor property.

    Set it to a dark gray color and then it should work fine.
  6. Pring macrumors 6502

    Sep 17, 2003
    /facepalm, I'm not exactly on the ball today!

    Makes perfect sense, thanks for the prompt response.
  7. fenrus110 macrumors regular

    Mar 24, 2008
    I have a black translucent navigation bar. I used [UIColor clearColor] for the tint, it looks pretty slick.

Share This Page