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更改字體陰影,邊框顏色或其他任何內容。
如何調整邊框顏色?