i utiliser le code ci-dessous pour ce problème
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
ne fonctionne pas pour moi maintenant (iOS 4.3) – Rodrigo