IOS 7 UISegmentControl 设置色调颜色不起作用。我将如何解决它?
这是我添加的代码:
UISegmentedControl *segmentControl = [[UISegmentedControl alloc] initWithItems:[NSMutableArray arrayWithObjects:@"YES",@"NO", nil]];
[segmentControl setTintColor:[UIColor orangeColor]];
但颜色只出现在边框上,我希望它为整个背景着色。
正如我从图书馆提到的,
@property(nonatomic) UISegmentedControlStyle segmentedControlStyle NS_DEPRECATED_IOS(2_0, 7_0, "The segmentedControlStyle property no longer has any effect");*