【发布时间】:2013-04-15 04:58:59
【问题描述】:
我正在开发一个应用程序,我必须在其中打开像这个视频一样的卡片。
http://www.youtube.com/watch?v=srnRuhFvYl0&feature=youtu.be
有人可以建议我任何库或任何可以在 2 个 uiview 之间制作此类动画的方式
【问题讨论】:
标签: iphone objective-c animation flip
我正在开发一个应用程序,我必须在其中打开像这个视频一样的卡片。
http://www.youtube.com/watch?v=srnRuhFvYl0&feature=youtu.be
有人可以建议我任何库或任何可以在 2 个 uiview 之间制作此类动画的方式
【问题讨论】:
标签: iphone objective-c animation flip
试试这个演示以获得你的效果。
【讨论】:
他们有很多帖子可以解决这个问题
turn-a-page-like-a-book-with-uiview
3d-door-open-animation-between-two-uiviewcontrollers
implementing-ibooks-page-curling THIS IS GREAT
希望你能从中找到解决方案.....
【讨论】:
在这里你可以用下面的动画实现逻辑..
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:yourView2 cache:YES];// Here i set UIView2
[yourView1 removeFromSuperview];// And here i remove UIView1
[UIView commitAnimations];
这里你也可以使用UIViewAnimationTransitionCurlDown 代替UIViewAnimationTransitionCurlUp
另见此演示..leaves-developers
【讨论】:
+[UIView beginAnimations:context:] Use of this method is discouraged in iOS 4.0 and later. You should use the block-based animation methods to specify your animations instead.
试试看……
- (IBAction)viewCommentBtnClk:(id)sender
{
ShowCommentViewController *showCommentVC = [[ShowCommentViewController alloc]init];
showCommentVC.buss_id = business_id;
[UIView beginAnimations:@"animation" context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
[self.navigationController pushViewController:showCommentVC animated:YES];
[UIView commitAnimations];
[self presentModalViewController:showCommentVC animated:YES];
[showCommentVC release];
}
希望我能帮上忙。
【讨论】: