Page Curl on iOS

后端 未结 5 1812
春和景丽
春和景丽 2020-11-30 23:46

I look around for similar posts but didn\'t find a solution. I\'m looking for a simple page turn animation (without finger tracking) like this: http://www.youtube.com/watch?

相关标签:
5条回答
  • 2020-12-01 00:26

    As I was looking for something similar I have found out that for some people (like me itself) UIPageViewController did the trick with transition style UIPageViewControllerTransitionStylePageCurl ideally. If you want to see what you can achieve using this component take a look at iBooks app and try to turn the page. Very simple to use, great effect.

    Page cant be rotated programatically and by a pan gesture which gives very page rotation/turning like feel.

    0 讨论(0)
  • This fragment of code do the trick:

    [UIView beginAnimations:@"Flip" context:nil];
    [UIView setAnimationDuration:1.0];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.base.view cache:YES];
    
    [user.view removeFromSuperview];
    [base.view addSubview:home.view];
    
    [UIView commitAnimations];
    

    In this example the "user" viewcontroller is removed, and the "home" viewcontroller is added, with a pageflip like transition

    0 讨论(0)
  • 2020-12-01 00:35

    Yes, that's possible.

    Read the following blog tutorial.

    http://oleb.net/blog/2010/06/app-store-safe-page-curl-animations/

    http://blog.steventroughtonsmith.com/2010/02/apples-ibooks-dynamic-page-curl.html

    http://wdnuon.blogspot.com/2010/05/implementing-ibooks-page-curling-using.html

    0 讨论(0)
  • 2020-12-01 00:39

    It's an old and closed question but if someone is looking for a working implementation look at this:

    Newer: iOS-PageCurl-OpenGL

    Older: XBPageCurl project

    0 讨论(0)
  • 2020-12-01 00:40

    Use UIViewAnimationTransitionCurlDown. Example shown in this question:

    curl down transition for adding an UIView to a superview

    0 讨论(0)
提交回复
热议问题