Skip to content

Instantly share code, notes, and snippets.

@tomisacat
Created December 9, 2014 12:42
Show Gist options
  • Save tomisacat/5e03e272d2b6698e4426 to your computer and use it in GitHub Desktop.
Save tomisacat/5e03e272d2b6698e4426 to your computer and use it in GitHub Desktop.
customize segment control ui style
NSDictionary *normalSettings = @{UITextAttributeTextColor: [UIColor grayColor], UITextAttributeFont: [UIFont systemFontOfSize:13]};
[self.segmentControl setTitleTextAttributes:normalSettings forState:UIControlStateNormal];
NSDictionary *highlightedSettings = @{UITextAttributeTextColor: [UIColor red:43 green:206 blue:119 alpha:1.0], UITextAttributeFont: [UIFont systemFontOfSize:16]};
[self.segmentControl setTitleTextAttributes:highlightedSettings forState:UIControlStateSelected];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment