File opening animation like in iBooks and Photos.app on iPad

戏子无情 提交于 2019-12-05 07:21:55

问题


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.


回答1:


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];


来源:https://stackoverflow.com/questions/7796821/file-opening-animation-like-in-ibooks-and-photos-app-on-ipad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!