I have a bit of code that goes like this:
//up till now someButton's alpha was 1
someButton.alpha = 0;
[UIView animateWithDuration:.25
delay:0.0
options:kMaskEaseOut
animations:^ {
someButton.alpha = 1;
}
completion:^ (BOOL finished){}];
The problem is someButton's alpha isn't set to 0 before the animation begins, ie nothing visually happens. Now, if I comment out the entire animation block it will indeed set the alpha of someButton to 0. Also, if I do this:
[UIView animateWithDuration:0
delay:0.0
options:kMaskEaseOut
animations:^ {
someButton.alpha = 0;
} completion:^ (BOOL finished){
[UIView animateWithDuration:.25
delay:0.0
options:kMaskEaseOut
animations:^ {
someButton.alpha = 1;
}
completion:^ (BOOL finished){}];
}];
it works fine (I start the animation after a 0 length animation) which is kind of silly.