PageTurn animation in iPhone
How to make page turn animation like the Stanza app ?
Earlier i was using , but its not the animation i am looking for.
[CATransaction begin];
CATransition *animation = [CATransition animation];
[animation setType:(prevPage ? @"pageUnCurl" : @"pageCurl")];
[animation setDuration:0.7f];
[animation setFillMode: ( prevPage ? kCAFillModeBackwards : kCAFillModeForwards )];
[animation setTimingFunction:[CAMediaT开发者_如何学运维imingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
[[self layer] addAnimation:animation forKey:@"transitionViewAnimation"];
[CATransaction commit];
Thanks
[UIView beginAnimations:@"yourAnim" context:nil];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:yourView cache:cacheFlag];
...
[UIView commitAnimations];
This does the page curl animation. For the flip, use the UIViewAnimationTransitionFlipFromLeft
or UIViewAnimationTransitionFlipFromRight
constant.
精彩评论