views:

158

answers:

1

Hi,

i want to change the color of the segment color while loading the application.

or is it possible to change the color of the segmentcontrol according to the NavigationBar header/title color?

Provide any solution with any code snippet or any useful link,which would be appreciated.

Thanks, Mishal

+3  A: 

This is in the documentation for UISegmentedControl under the tintColor property, e.g.:

UISegmentedControl *segmentedControl;
segmentedControl.tintColor = [UIColor redColor];

If you prefer, you can use the -setTintColor: method:

[segmentedControl setTintColor:[UIColor redColor]];
Alex Reynolds
Put this in your viewDidLoad or viewWillAppear: method.
Ben Gottlieb