View Full Version : UISegmentedControl in SDK 3.0, want white text instead of grey text

May 8, 2009, 03:04 PM
I have a UISegmentedControl (BarStyle) in my UINavigationController in SDK 3.0. It just has 2 buttons, Save and Cancel. So it doesn't really switch states cuz it closes once it is touched.

In SDK 3.0, I find the text is a grey color rather than white.

I played around with it, the only way I can get the text white is to set the selectedSegmentIndex to one of the values. Of course, this leaves one grey and one white, that's no good. Though, I'm not sure if it will screw my up delegate code...

Any suggestions on getting white text? FYI, I'm using a BlackOpaque UINavigationController.

May 8, 2009, 03:09 PM
Sounds to me like you are using a segmented control for something other than its intended purpose. That's probably a violation of the Mobile HIG.

May 8, 2009, 03:26 PM
A UISegmentedControl object is a horizontal control made of multiple segments, each segment functioning as a discrete button. A segmented control affords a compact means to group together a number of controls.

There's nothing wrong with using them as plain buttons. Especially when I set the momentary = YES. But anyways, to illustrate, the top is 2.0, the bottom is 3.0. I just want the white text cuz it looks better.


May 8, 2009, 03:33 PM
Hmm, alright. Sounds like you've found a bug with the 3.0 version of the segmented control. I would suggest submitting a bug report to Apple.