I want to set the selected segment text colour as white and it will be in highlighted state.If I select the other segment then the selected segment text colour should be highlighted and it should be in highlighted state until i will select the different segment.Is it possible?I don't want to hightlight the selected segment but i want to hightlight the text colour until i will deselect or select another segment.
            Asked
            
        
        
            Active
            
        
            Viewed 581 times
        
    3 Answers
0
            
            
        use segment.tintColor = [uicolor whitecolor];
it will help.
- 
                    I dont want to highlight the selected segment.I just want to highlight the selected segment text colour – user2186457 Apr 02 '13 at 11:48
- 
                    ok make tow different images, one for normal and second for selected. and change the images accordingly. – aBilal17 Apr 02 '13 at 11:50
0
            
            
        use it, where objectAtIndex:0 is your selected index.
for (UIView *v in [[[segment subviews] objectAtIndex:0] subviews]) {
   if ([v isKindOfClass:[UILabel class]]) {
      UILabel *lable=(UILabel *)[v retain];
      lable.textColor=[UIColor blackColor];
   }
}
 
    
    
        aBilal17
        
- 2,974
- 2
- 17
- 23
0
            
            
        The answer in the below link fixed the problem.How to change font color of UISegmentedControl
 
    
    
        Community
        
- 1
- 1
 
    
    
        user2186457
        
- 128
- 6
