开发者

Animate leafing through?

Is there any way to animat开发者_C百科e leafing through views to look like a real book leafing through?


There is always the option of using CoreAnimation to animate any view. For this purpose, it could become quite complex though.

There is a native animation for UIView that peels it up from the corner like a page. This kind of animation is more akin to leafing through a notepad than a book but it may just serve the purpose your looking for. If you wanted to do this it would look something like this:

[UIView setAnimationDuration:duration];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:view cache:NO];
[UIView commitAnimations];

The duration of the animation can be set to whatever you like.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜