I would like to “stretch” the UIView on the right side, that is, increase its frame.size.width by the pixels foo and at the same time reduce its frame.origin.x by the pixels foo using the [UIView beginAnimations] syntax. However, if I do this when the animation starts, the view immediately resizes and then starts the animation to start.
CGRect currFrame = someView.frame;
currFrame.size.width += 100;
currFrame.origin.x -= 100;
[UIView beginAnimations:@"Anim1" context:nil];
someView.frame = currFrame;
[UIView setAnimationDuration:0.7];
[UIView commitAnimations];
I also tried to split the animation into two parts, but then I can’t keep the correct position in place.
Any help is much appreciated!
user295423
source
share