I am trying to animate a UIlabel to first grow larger, then shrink back to its original frame. Enlarging work as expected, but not shrinking. When I shrink the label with the below code, the size adjusts first before the origin is shifted. This causes a two step animation which isn't smooth.
Here is my code:
CGRect rect = label.frame;
[UIView animateWithDuration:.2
delay: 0.1
options: UIViewAnimationOptionBeginFromCurrentState
animations:^{
label.frame = CGRectMake(rect.origin.x + 4,
rect.origin.y + 4,
rect.size.width-8,
rect.size.height-8);
}
completion:^(BOOL finished){
}];
UIViewAnimationOptionTransitionNone
? – Lily Ballard