At first, I set a view's alpha to 0.4, I want to some actions later when aView.alpha == 0.4, but the compare failed.
Code:
aView.alpha = 0.4;
...//never changes aView.alpha.
if (aView.alpha == 0.4) {
//this compare failed.
}
BUT, when I set the alpha to 0.5, it works!
aView.alpha = 0.5;
...
if (aView.alpha == 0.5) {
//it's OK.
}
Anything wrong?