i use below code for this problem
int eg=0;
for (id seg in [sg subviews])
{
int gg=sg.selectedSegmentIndex;
if(gg==2)
gg=0;
else if(gg==0)
gg=2;
if(eg==gg && eg!=1)
{
for (id label in [seg subviews])
if ([label isKindOfClass:[UILabel class]])
{
[label setTextAlignment:UITextAlignmentCenter];
[label setFont:[UIFont boldSystemFontOfSize:12]];
[label setTextColor:[UIColor colorWithRed:0.325 green:0.565 blue:0.788 alpha:1]];
}//if
}//if
else if(eg==1)
{
for (id label in [seg subviews])
if ([label isKindOfClass:[UILabel class]])
{
[label setTextAlignment:UITextAlignmentCenter];
[label setFont:[UIFont boldSystemFontOfSize:11]];
[label setTextColor:[UIColor grayColor]];
}//if
}//else if
else
{
for (id label in [seg subviews])
if ([label isKindOfClass:[UILabel class]])
{
[label setTextAlignment:UITextAlignmentCenter];
[label setFont:[UIFont boldSystemFontOfSize:11]];
[label setTextColor:[UIColor colorWithRed:0.888 green:0.888 blue:0.888 alpha:1]];
}//if
}//else
eg++;
}//for