Aks*_*hay 12

注意:这仅适用于iOS5 +.

UIFont *font = [UIFont boldSystemFontOfSize:12.0f];
NSDictionary *attributes = [NSDictionary dictionaryWithObject:font
                                                       forKey:UITextAttributeFont];
[segmentedControl setTitleTextAttributes:attributes 
                                forState:UIControlStateNormal];
Run Code Online (Sandbox Code Playgroud)