0
如何设置用于iPhone ios 4.3的UISegmentedControl的字体颜色?如何设置UISegmentedControl for iPhone的字体颜色ios 4.3
为iOS 5.0,我使用
UISegmentedControl *button = [[[UISegmentedControl alloc]
initWithItems:[NSArray >arrayWithObjects:itemTitle, nil]] autorelease];
NSDictionary *attributes = [NSDictionary dictionaryWithObject:fontColor forKey:UITextAttributeTextColor];
[button setTitleTextAttributes:attributes forState:UIControlStateNormal];
button.momentary = YES;
button.segmentedControlStyle = UISegmentedControlStyleBar;
button.tintColor = tintColor;