AFViewShaker 是一个简单的工具用来执行 。
使用方法:
AFViewShaker * viewShaker = [[AFViewShaker alloc] initWithView:self.formView]; NSArray * allFields = @[self.emailField, self.passwordField]; AFViewShaker * viewShaker = [[AFViewShaker alloc] initWithViewsArray:allFields]; [self.viewShaker shake]; [self.viewShaker shakeWithDuration:0.6 completion:^{ NSLog(@"Hello World!"); }];