【问题标题】:flip uiview like ope a card with animation [duplicate]像打开带有动画的卡片一样翻转uiview [重复]
【发布时间】:2013-04-15 04:58:59
【问题描述】:

我正在开发一个应用程序,我必须在其中打开像这个视频一样的卡片。

http://www.youtube.com/watch?v=srnRuhFvYl0&feature=youtu.be

有人可以建议我任何库或任何可以在 2 个 uiview 之间制作此类动画的方式

【问题讨论】:

标签: iphone objective-c animation flip


【解决方案1】:

试试这个演示以获得你的效果。

MPFlipViewController

【讨论】:

  • 你好 Samir,我喜欢这个库...但是我们可以翻转整个页面而不是翻转一半吗?
【解决方案2】:

他们有很多帖子可以解决这个问题

turn-a-page-like-a-book-with-uiview

3d-door-open-animation-between-two-uiviewcontrollers

implementing-ibooks-page-curling THIS IS GREAT

希望你能从中找到解决方案.....

【讨论】:

    【解决方案3】:

    在这里你可以用下面的动画实现逻辑..

    [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.
    • @Shivam S.Kara 你用过这个代码??并尝试演示??
    • 不——我只是让你知道不鼓励使用非基于块的 api。
    【解决方案4】:

    试试看……

    - (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];
    }
    

    希望我能帮上忙。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-11-22
      • 2014-03-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-05
      • 2017-10-20
      相关资源
      最近更新 更多