I try to change font color from white to black for UISegmentedControl
(for iOS 4.*)
UISegmentedControl *button = [[[UISegmentedControl alloc] in
If you need to change the text color of the highlighted segment in iOS 7, here is a solution (took me awhile to find, but thanks to this post):
Objective-C
[[UISegmentedControl appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor blackColor]} forState:UIControlStateSelected];
Swift
let titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()]
UISegmentedControl.appearance().setTitleTextAttributes(titleTextAttributes, forState: .Selected)