2016-05-19 9 views

Antwort

2

Einfach @{NSForegroundColorAttributeName : [UIColor whiteColor]} als Textattribut für UIControlStateSelected Zustand

@interface ViewController() 

@property (weak, nonatomic) IBOutlet UISegmentedControl *segmentedControl; 

@end 

@implementation ViewController 

- (void)viewDidAppear:(BOOL)animated{ 
    [super viewDidAppear:animated]; 

    NSDictionary *dict = @{NSForegroundColorAttributeName : [UIColor whiteColor]}; 


    [self.segmentedControl setTitleTextAttributes:dict forState:UIControlStateSelected]; 
} 

@end