Tuesday, July 26, 2011

Customize UISlider color

Instead of having 3 UISlider with 3 UILabels telling red, green, blue, we have 3 UISlider with custom colors. Everybody would agree that this is nicer…
To do this, just customize your UISlider this way :
[redSlider setMinimumTrackImage:[[UIImage imageNamed:@"redSlider.png"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0] forState:UIControlStateNormal];
Then you just need the images. Taken (and edited) from the UICatalog Apple Template :

No comments:

Post a Comment