2
我无法在iOS7中更改我的分段控件的边框颜色。我发现后续建议其他地方计算器:uisegmentedcontrol的边框颜色
[[UISegmentedControl appearance] setTitleTextAttributes:@{
UITextAttributeTextColor: [UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0],
UITextAttributeTextShadowColor: [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0],
UITextAttributeFont: [UIFont fontWithName:@"Arial-Bold" size:0.0],
NSForegroundColorAttributeName : [UIColor redColor],
} forState:UIControlStateSelected];
[self.segmentedControl setTitleTextAttributes:@{
UITextAttributeTextColor: [UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0],
UITextAttributeTextShadowColor: [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0],
UITextAttributeFont: [UIFont fontWithName:@"Arial-Bold" size:0.0],
NSForegroundColorAttributeName : [UIColor redColor],
} forState:UIControlStateNormal];
但在这两种情况下,我的境界仍是蓝色。我似乎无法通过settitleTextAttributes更改字体阴影,边框颜色或其他任何内容。
如何调整边框颜色?