我有一个分段控件,它有三个按钮,我想要将分隔线条的线条变暗。
我的代码是:
NSArray *listArray = [NSArray arrayWithObjects:@"Email",@"SMS",nil];
UISegmentedController *segmentedController = [[UISegmentedControl alloc] initWithItems:listArray];
segmentedController.segmentedControlStyle = UISegmentedControlStyleBar;//i have to use this style(bar)
segmentedController.momentary = YES;
segmentedController.frame = CGRectMake (90, CGRectGetMaxY(lbl.frame)+50, 140, 40);
//seg.tintColor = [UIColor redColor];
[segmentedController addTarget:self action:@selector(segmentAction:) forControlEvents:UIControlEventValueChanged];
[self.view addSubview:segmentedController];
答案 0 :(得分:0)
将样式切换为纹理圆角:
原创(圆形):
纹理圆形: