/* 用户名为空时UITextFild 抖动 */
- (void)shake{
CAKeyframeAnimation *keyAni = [CAKeyframeAnimation animationWithKeyPath:@"position"];
[keyAni setDuration:0.24f];
NSArray *array = [[NSArray alloc] initWithObjects:[NSValue valueWithCGPoint:CGPointMake(self.field.center.x, self.field.center.y)],
[NSValue valueWithCGPoint:CGPointMake(self.field.center.x - 5, self.field.center.y)],
[NSValue valueWithCGPoint:CGPointMake(self.field.center.x + 5, self.field.center.y)],
[NSValue valueWithCGPoint:CGPointMake(self.field.center.x, self.field.center.y)],nil];
[keyAni setValues:array];
[self.field.layer addAnimation:keyAni forKey:@"text"];
}