CALayer *lbl = [view layer];
CGPoint posLbl = [lbl position];
CGPoint y = CGPointMake(posLbl.x-10, posLbl.y);
CGPoint x = CGPointMake(posLbl.x+10, posLbl.y);
CABasicAnimation * animation = [CABasicAnimation animationWithKeyPath:@"position"];
[animation setTimingFunction:[CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
[animation setFromValue:[NSValue valueWithCGPoint:x]];
[animation setToValue:[NSValue valueWithCGPoint:y]];
[animation setAutoreverses:YES];
[animation setDuration:0.08];
[animation setRepeatCount:3];
[lbl addAnimation:animation forKey:nil];
CGPoint posLbl = [lbl position];
CGPoint y = CGPointMake(posLbl.x-10, posLbl.y);
CGPoint x = CGPointMake(posLbl.x+10, posLbl.y);
CABasicAnimation * animation = [CABasicAnimation animationWithKeyPath:@"position"];
[animation setTimingFunction:[CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
[animation setFromValue:[NSValue valueWithCGPoint:x]];
[animation setToValue:[NSValue valueWithCGPoint:y]];
[animation setAutoreverses:YES];
[animation setDuration:0.08];
[animation setRepeatCount:3];
[lbl addAnimation:animation forKey:nil];