所以我有一个带有自定义 backgroundImage 的 UISegmentedControl。这是我设置它的方法:
UISegmentedControl * segmentedCtrl = [[UISegmentedControl alloc] initWithFrame:CGRectMake(0, 0, 178, 30)];
[segmentedCtrl setSegmentedControlStyle:UISegmentedControlStyleBar];
[segmentedCtrl setTintColor:[UIColor clearColor]];
[segmentedCtrl setSegmentedControlStyle:UISegmentedControlStyleBezeled];
[segmentedCtrl insertSegmentWithImage:[UIImage imageNamed:@"btn-home-down.png"] atIndex:0 animated:NO];
.....
[segmentedControl setImage:[UIImage imageNamed:@"btn-home.png"] forSegmentAtIndex:0];
[segmentedControl setImage:[UIImage imageNamed:@"btn-popular.png"] forSegmentAtIndex:1];
[segmentedControl setImage:[UIImage imageNamed:@"btn-my-photos.png"] forSegmentAtIndex:2];
[segmentedControl setImage:[UIImage imageNamed:@"btn-places.png"] forSegmentAtIndex:3];
[segmentedControl setImage:[UIImage imageNamed:@"btn-my-likes"] forSegmentAtIndex:4];
现在问题是这样的:
如果您在分段图像之间仔细观察,在底部的分隔线上我有点像有一个白点。我所有的图像都设置为正方形。为什么会这样,我该如何消除?