あなたの代わりに「fromLeft」を設定することができ、次のコードスニペット
- (void)curlAnimation
{
[UIView animateWithDuration:1.0
animations:^{
CATransition * animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:1.2f];
animation.startProgress = 0.0;
animation.endProgress = 1;
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"pageCurl"];
[animation setSubtype:@"fromRight"];
[animation setRemovedOnCompletion:NO];
[animation setFillMode: @"extended"];
[animation setRemovedOnCompletion: NO];
[[self.view1 layer] addAnimation:animation
forKey:@"pageFlipAnimation"];
}
];
}
を使用してカールアニメーションを作成し、この
UISwipeGestureRecognizer *gesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(curlAnimation)];
[gesture setDirection:UISwipeGestureRecognizerDirectionLeft];
[self.view1 addGestureRecognizer:gesture];
ようなあなたのビューでスワイプジェスチャーを追加します。このメソッドのfromRight [animation setSubtype:@"fromRight"]
左から右にアニメートする
コーディングハッピー
..
このhttp://www.iostute.com/2015/04/how-to-implement-partial-and-full-page.html –
おかげ暗部を参照してください。私はそれを調べました。これはあらかじめ定義されたアニメーションの時間と時間を持つボタンのクリックで起こります。私はこの機能を、iBooksアプリに実装されているユーザーの指の動きに合わせて使いたいと思っています。 –
自分自身をカスタマイズしてジェスチャーでコードを追加するthats all –