iBook page flip transition

2019-02-05 14:55发布

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?

3条回答
手持菜刀,她持情操
2楼-- · 2019-02-05 15:18

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!

查看更多
再贱就再见
3楼-- · 2019-02-05 15:25

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];
查看更多
趁早两清
4楼-- · 2019-02-05 15:35

There aren't many options. There is a similar question here, check it:

Turn a page like a Book with UIView?

查看更多
登录 后发表回答