Page Curl on iOS

2019-01-08 08:15发布

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?v=_vOYvaNhSHw

Is it possible to create or license it?

Many thanks for your help.

5条回答
欢心
2楼-- · 2019-01-08 08:42

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.

查看更多
\"骚年 ilove
3楼-- · 2019-01-08 08:44

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

查看更多
Deceive 欺骗
4楼-- · 2019-01-08 08:46

its old and closed question but if someone is looking for working implementation look at this XBPageCurl project

查看更多
Root(大扎)
6楼-- · 2019-01-08 09:07

Use UIViewAnimationTransitionCurlDown. Example shown in this question:

curl down transition for adding an UIView to a superview

查看更多
登录 后发表回答