Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
is this possible? i'd like the selected segment to have white text, while the non selected segments have gray text.

there only appears setTitle:forSegmentAtIndex: in the docs,and writing the following doesn't work:

Code:
[self.mySegment setTitleColor:[UIColor greenColor] forState:UIControlStateNormal];
 

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
No, not with the UISegmentedControl's API. There are workarounds, though messy, such as using setImage:forSegmentAtIndex:

oh that's too bad, especially since i always though the selected segment should be the light blue instead of the dark blue (default without tint), or at least the non selected text should appear darker by default...

setImage wouldn't work with localization, well... it could but... i think i'll stick to the all white text instead of creating 50 different images in Illustrator.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.