UIViewAnimationOptions
Parameters of animated views with blocks.
enum { UIViewAnimationOptionLayoutSubviews = 1 << 0, UIViewAnimationOptionAllowUserInteraction = 1 << 1, UIViewAnimationOptionBeginFromCurrentState = 1 << 2, UIViewAnimationOptionRepeat = 1 << 3, UIViewAnimationOptionAutoreverse = 1 << 4, UIViewAnimationOptionOverrideInheritedDuration = 1 << 5, UIViewAnimationOptionOverrideInheritedCurve = 1 << 6, UIViewAnimationOptionAllowAnimatedContent = 1 << 7, UIViewAnimationOptionShowHideTransitionViews = 1 << 8, UIViewAnimationOptionCurveEaseInOut = 0 << 16, UIViewAnimationOptionCurveEaseIn = 1 << 16, UIViewAnimationOptionCurveEaseOut = 2 << 16, UIViewAnimationOptionCurveLinear = 3 << 16, UIViewAnimationOptionTransitionNone = 0 << 20, UIViewAnimationOptionTransitionFlipFromLeft = 1 << 20, UIViewAnimationOptionTransitionFlipFromRight = 2 << 20, UIViewAnimationOptionTransitionCurlUp = 3 << 20, UIViewAnimationOptionTransitionCurlDown = 4 << 20, }; typedef NSUInteger UIViewAnimationOptions;
Consider the enum definitions from the iOS documentation. My question is:
For UIViewAnimationOptionCurveEaseInOut the constant is "0 <16", but if my understanding is correct, 0 left shift by 16 positions is still 0. And it should be the same as UIViewAnimationOptionTransitionNone, which is equal to "0 <20", (since it must also be 0). Having 2 very different parameters equal to the same value does not seem to make sense.
In addition, my testing shows that UIViewAnimationOptionCurveEaseInOut does not seem to have any effect.
There may be some misunderstanding on my part, I hope that someone who knows will help ...
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIView_Class/UIView/UIView.html%23//apple_ref/c/tdef/UIViewAnimationOptions
source share