我用这条线定角
segmentedControl1.layer.cornerRadius = 0.7;
segmentedControl1.layer.borderColor = [UIColor whiteColor].CGColor;
segmentedControl1.layer.borderWidth = 1.0f;
segmentedControl1.layer.masksToBounds = YES;
它工作正常,但是当我为其设置背景图像时,角半径将不起作用
[segmentedControl1 setBackgroundImage:[UIImage imageNamed:@"segment-background.png"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];