Im using CGAffineTransformMakeScale to scale a UIView from 0.1 to 1.0.
The problem is that the view is also rotating while the scaling is being animated. So it ends with a scale of 1.0 AND 90º of rotation.
[self presentModalViewController:slideTwoViewController animated: NO];
[slideTwoViewController.view setTransform:CGAffineTransformMakeScale(0.1,0.1)];
[UIView beginAnimations: nil context: nil];
[UIView setAnimationDuration:2.0];
[slideTwoViewController.view setTransform:CGAffineTransformMakeScale(1.0,1.0)];
[UIView commitAnimations];
The initial application orientation is landscape left. So when the animation ends the UIView looks like in portrait.
Is this supposed to happen? am I missing something?
Thanks
My bet, is the view already have a transform set and you are overwriting it with the new transform and it is animating the difference.
Try using the following function instead:
With this function, you pass the original transform
slideTwoViewController.view.transformand your scale factor.