So I've used CGAffineTransform to zoom in,
CGAffineTransform newTrans2 = CGAffineTransformScale(mainView.transform,1.05,1.05);
mainView.transform = newTrans2;
I do this 15 times to have an animation effect.
Now I would like to zoom out such that mainView fits the iPhone frame (0,0,320,480).
Besides, the user is able to pinch in and pinch out, so I really wonder how I can zoom out and reset it in the original space.
How can I do this?