KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a problem with the setting UIViewAnimationOptionAutoReverse . Here is my code. CALayer *aniLayer = act.viewToChange.layer; [UIView animateWithDuration:2.0 delay:1.0 options:(UIViewAnimationCurveLinear | UIViewAnimationOptionAutoreverse) animations:^{ viewToAnimate.frame = GCRectMake(1,1,100,100); [aniLayer setValue:[NSNumber numberWithFloat:degreesToRadians(34)] forKeyPath:@"transform.rotation"]; } completion:nil ]; The problem is that, after the animation has reversed, the view jumps back to the frame set in the animation block. I want the view to grow and "ungrow" and stop at its original position. Is there a solution without programming two consecutive animations?
Tags (comma-separated)
Save Edits
Cancel