UIView 抖动动画效果:AFViewShaker

jopen 8年前

AFViewShaker是简单实用程序,实现了UIView抖动动画。

用法

Create shaker for one view
AFViewShaker * viewShaker = [[AFViewShaker alloc] initWithView:self.formView]; 
Create shaker for multiple views
NSArray * allFields = @[self.emailField, self.passwordField]; AFViewShaker * viewShaker = [[AFViewShaker alloc] initWithViewsArray:allFields]; 
Shake with default parameters
[self.viewShaker shake]; 
Shake with additional parameters
[self.viewShaker shakeWithDuration:0.6 completion:^{     NSLog(@"Hello World!"); }]; 
08080314_dvj4.gif

项目主页:http://www.open-open.com/lib/view/home/1402190398775