I have a project with two segmented controls. They both worked up to iOS7.0. Now one does not. I've read of issues with tintColor, but I think this is something different.
Both controls use UIImages as segments. On one, the images all show correctly. On the other, I get all blue images.
Am I doing something wrong or is this a bug?
Here's the code of the faulty segment:
UISegmentedControl *colorControl = [[UISegmentedControl alloc] initWithItems:
[NSArray arrayWithObjects:
[UIImage imageNamed:@"White.png"],
[UIImage imageNamed:@"Red.png"],
[UIImage imageNamed:@"Yellow.png"],
[UIImage imageNamed:@"Green.png"],
[UIImage imageNamed:@"Blue.png"],
[UIImage imageNamed:@"Purple.png"],
[UIImage imageNamed:@"Black.png"], nil]];
CGRect frame = CGRectMake(rect.origin.x + kLeftMargin, rect.size.height - kPaletteHeight - kTopMargin, rect.size.width - (kLeftMargin + kRightMargin), kPaletteHeight );
colorControl.frame = frame;
// Add DoubleTap Color capability
gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showMoreColors:)];
[gesture setNumberOfTapsRequired:2];
[colorControl addGestureRecognizer:gesture];
// When the user chooses a color, the method changeColor: is called.
[colorControl addTarget:self action:@selector(changeColor:) forControlEvents:UIControlEventValueChanged];
// Make sure the color of the color complements the black background
//colorControl.tintColor = [UIColor clearColor];
// Add the control to the window
[self.view addSubview:colorControl];
While the images are all blue, the segments work as expected.