无法设置UISegmentedControl以使其清晰

时间:2011-06-19 20:32:07

标签: uiview uisegmentedcontrol uicolor

将segmentedControl的颜色设置为clear,我目前做错了什么?它目前是黑色的?

UISegmentedControl *control = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"Info", @"People", @"Photos", @"Items", nil]];
    [control setFrame:CGRectMake(0, 45, self.frame.size.width, 40)];
    [control setBackgroundColor:[UIColor clearColor]];
    [control setSegmentedControlStyle:UISegmentedControlStyleBar];
    [control setSelectedSegmentIndex:0];

0 个答案:

没有答案