You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the argument "options" always takes the same value (UIViewAnimationCurveEaseInOut) regardless of actual value.
The fact that the implementation of that method lies the error. In this situation you can not work with enums as with bit-fields!
In the example presented below:
UIView animateWithDuration:1.5 delay:0.0 options:UIViewAnimationOptionCurveEaseInOut animations:^(void) {
// property animations
} completion:nil ];
the argument "options" always takes the same value (UIViewAnimationCurveEaseInOut) regardless of actual value.
The fact that the implementation of that method lies the error. In this situation you can not work with enums as with bit-fields!
If we replace this:
// In UIView
// + (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay
// options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion
if ((options & UIViewAnimationOptionCurveEaseInOut) == UIViewAnimationOptionCurveEaseInOut) {
animationCurve = UIViewAnimationCurveEaseInOut;
} else if ((options & UIViewAnimationOptionCurveEaseIn) == UIViewAnimationOptionCurveEaseIn) {
animationCurve = UIViewAnimationCurveEaseIn;
} else if ((options & UIViewAnimationOptionCurveEaseOut) == UIViewAnimationOptionCurveEaseOut) {
animationCurve = UIViewAnimationCurveEaseOut;
} else {
animationCurve = UIViewAnimationCurveLinear;
}
On simple:
animationCurve = (options >> 16) & 0x03;
Then the behavior will be correct
The text was updated successfully, but these errors were encountered: