开发者

Animate leafing through?

开发者 https://www.devze.com 2022-12-08 07:54 出处:网络
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

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

精彩评论

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