[UIView beginAnimations:@"movement" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:0.5f];
[UIView setAnimationRepeatCount:2.5];
[UIView setAnimationRepeatAutoreverses:YES];
CGPoint center = self.animationImage.center;
NSLog(@"%f",center.y);
if(center.y >= 20.0f) {
center.y -= 5.0f;
self.animationImage.center = center;
} else {
center.y += 5.0f;
self.animationImage.center = center;
}
[UIView commitAnimations];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:0.5f];
[UIView setAnimationRepeatCount:2.5];
[UIView setAnimationRepeatAutoreverses:YES];
CGPoint center = self.animationImage.center;
NSLog(@"%f",center.y);
if(center.y >= 20.0f) {
center.y -= 5.0f;
self.animationImage.center = center;
} else {
center.y += 5.0f;
self.animationImage.center = center;
}
[UIView commitAnimations];