custom modalViewController animation

471 Views Asked by At

I have an image when pressed presents a full size view of the image in another UIViewController. Now the issue is that how do I make so that the modal view controller when presented animates from this image to full screen, kind of how flipboard does it. Any idea? Also wanted to do the same thing when dismissing.

I guess the smart way to do it here is to just add a subview to the whole view and not use a modalViewController. The question is how do I animate a UIImage to resize larger/smaller?

1

There are 1 best solutions below

0
On BEST ANSWER

My suggestion would be to have a UIImageView at your smaller size and then animate it to your larger frame, using something like what I have below.

[UIView animateWithDuration:1.0
                 animations:^{
                     myUIImageView.frame = largerFrame;
                 }];