In my app,i able to change the color of the selected segment control.But the color is changed for another index rather than selected index. I can find any mistake in the ind
I'd recommend to create the two colors outside of your condition, makes your code a bit smaller. Then you can use a foreach to iterate over your segments :
UIColor *selectedColor = [UIColor colorWithRed: 98/255.0 green:156/255.0 blue:247/255.0 alpha:1.0];
UIColor *deselectedColor = [UIColor colorWithRed: 54/255.0 green:52/255.0 blue:48/255.0 alpha:1.0];
for (UIControl *subview in [SegmentRound subviews]) {
if ([subview isSelected])
[subview setTintColor:selectedColor];
else
[subview setTintColor:deselectedColor];
}