iBook page flip transition

后端 未结 2 1601
误落风尘
误落风尘 2020-12-30 17:05

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 wit

2条回答
  •  余生分开走
    2020-12-30 17:46

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

提交回复
热议问题