iBook page flip transition

99封情书 提交于 2019-11-29 10:28:25

问题


I'm trying recreate iBook like transition for pages in landscape mode for an pdf reader app. I only need the animation, not the, touch handling like iBook app; the user with a simple swipe turn the page. I have tried different sample code, including Leaves, but I can't find anything simple. Can Anyone help me to create this simple animation, or there's a simple way to recreate iBook transition?


回答1:


Ole Begemann has done something like this. You can find the project here on GitHub.

Ole also writes a superb blog summary of some of the best developer links and tutorials around. Well worth subscribing to!




回答2:


Look at the UIView documentation for animation types available. Here is what I'd use:

UIViewAnimationOptions animation;
if (pageNumberLower) {
    animation = UIViewAnimationOptionTransitionCurlDown;
} else {
    animation = UIViewAnimationOptionTransitionCurlUp;
}

[UIView transitionWithView:myChangingView
                  duration:0.5
                   options:animation
                animations:^{ CHANGE PAGE HERE }
                completion:NULL];


来源:https://stackoverflow.com/questions/5805038/ibook-page-flip-transition

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