Why does the UISlider view ignore the alpha view when set to 0.5?
Code:
for (int i = 0; i < 3; i++) {
UISlider *slider = [[[UISlider alloc]
initWithFrame:CGRectMake(0, i * 30, 200, 30)]
autorelease];
slider.alpha = 0.4 + (CGFloat)i / 10.0f;
[window addSubview:slider];
}
Result:
The sliders have alpha values 0.4, 0.5 and 0.6. And as you can see the middle one with 0.5 is completely opaque. It seams to only occur with alpha 0.5. Have tested other UI controllers and they work as expected with alpha is set to 0.5.
Reproduced with iOS 4.2 on real device and with iOS 3.2 and 4.2 in simulator.
BTW if someone curious how and why I hit this problem it's the sliding direction pad configuration for a puzzle game called Slippy.