Friday, July 27, 2012
Thursday, July 5, 2012
Shake Animation in xcode
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"position"];
[animation setDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:)];
[animation setDuration:0.05];
[animation setRepeatCount:4];
[animation setAutoreverses:YES];
[animation setFromValue:[NSValue valueWithCGPoint:
CGPointMake([v center].x - 14.0f, [v center].y)]];
[animation setToValue:[NSValue valueWithCGPoint:
CGPointMake([v center].x + 14.0f, [v center].y)]];
[[v layer] addAnimation:animation forKey:@"position"];
Subscribe to:
Posts (Atom)