You are looking for the tintColor property!
When you use UISegmentedControl , you can change the hue color to any color you can think of. So, if you added a UISegmentedControl to the Interface Builder, you would put it in your method - (void)viewWillAppear:(BOOL)animated as such (assuming you connected it to @synthesized ivar:
- (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated];
Now, obviously, you will want to play with the red, green, blue and alpha that I set in the above code example, but you can literally color the UISegmentedController with whatever color you want (or make it transparent as you would like), so it's just a matter of finding RGBA values ββthat look perfect for you.
Remember that Apple documents that the default value of this property is nil (no color). UISegmentedControl uses this property only if the style of the segmented control is UISegmentedControlStyleBar. the default value of this property is nil (no color). UISegmentedControl uses this property only if the style of the segmented control is UISegmentedControlStyleBar.
Good luck
Neal l
source share