1

When you open a PDF file in iBooks.app, its thumbnail expands to entire screen, then it shows a PDF page. And when you open a photo in Photos.app on iPad, its thumbnail expands to entire screen too. Then you can swipe between pages, zoom it and so on. So, I would like to implement this animation in my application, but I have no idea how to do it.

Can you help me? Thank you very much for your answer.

Mat
  • 202,337
  • 40
  • 393
  • 406
Randex
  • 770
  • 7
  • 30

1 Answers1

2

You can use a simple animation:

  // Begin animation
  [UIView beginAnimations:nil context:NULL];
  [UIView setAnimationCurve:UIViewAnimationCurveLinear];
  [UIView setAnimationDuration:0.5];

  // Maximize image size
  MyImage.frame = self.view.frame;

  // Commit animation
  [UIView commitAnimations];
rjobidon
  • 3,055
  • 3
  • 30
  • 36
  • I suggest looking into CAKeyframeAnimation if you want a more sophisticated animation. http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CAKeyframeAnimation_class/Introduction/Introduction.html#//apple_ref/occ/cl/CAKeyframeAnimation – steipete Dec 27 '11 at 11:09