¡@

Home 

2014/10/15 ¤U¤È 10:14:05

iphone Programming Glossary: shakeanimation

UIView shake animation

http://stackoverflow.com/questions/3844557/uiview-shake-animation

animate const int numberOfShakes 8 const float durationOfShake 0.5f const float vigourOfShake 0.1f CAKeyframeAnimation shakeAnimation CAKeyframeAnimation animation CGRect frame lockView.frame CGMutablePathRef shakePath CGPathCreateMutable CGPathMoveToPoint.. shakePath NULL CGRectGetMinX frame frame.size.width vigourOfShake CGRectGetMinY frame CGPathCloseSubpath shakePath shakeAnimation.path shakePath shakeAnimation.duration durationOfShake lockView.layer addAnimation shakeAnimation forKey @ frameOrigin .. frame frame.size.width vigourOfShake CGRectGetMinY frame CGPathCloseSubpath shakePath shakeAnimation.path shakePath shakeAnimation.duration durationOfShake lockView.layer addAnimation shakeAnimation forKey @ frameOrigin iphone cocoa touch animation..

Facebook like login screen and validation(Window Shake Effect) [closed]

http://stackoverflow.com/questions/9447281/facebook-like-login-screen-and-validationwindow-shake-effect

@ position for cocoa application take a look at Core Animation Tutorial Window Shake Effect . CAKeyframeAnimation shakeAnimation NSRect frame int numberOfShakes 4 float durationOfShake 0.2f float vigourOfShake 0.04f CAKeyframeAnimation shakeAnimation.. NSRect frame int numberOfShakes 4 float durationOfShake 0.2f float vigourOfShake 0.04f CAKeyframeAnimation shakeAnimation CAKeyframeAnimation animation CGMutablePathRef shakePath CGPathCreateMutable CGPathMoveToPoint shakePath NULL NSMinX frame.. shakePath NULL NSMinX frame frame.size.width vigourOfShake NSMinY frame CGPathCloseSubpath shakePath shakeAnimation.path shakePath shakeAnimation.duration durationOfShake return shakeAnimation window setAnimations NSDictionary dictionaryWithObject..