【问题标题】:how to implement the foldout animation view like the original iPhone google map app?如何像原来的 iPhone 谷歌地图应用一样实现折叠动画视图?
【发布时间】:2009-09-24 16:22:01
【问题描述】:

all coder ,我在原来的 iPhone google map app 中看到了折叠动画视图,我想要在我的视图中看到同样的效果,但是我没有找到解决方案...

如何通过 iPhone sdk 做同样的动画?任何提示将不胜感激...

谢谢...

iRobin

【问题讨论】:

    标签: iphone


    【解决方案1】:

    我相信您正在寻找的是UIViewAnimationTransitionCurlUpUIViewAnimationTransitionCurlDown,这两个可以在切换视图时应用的过渡效果。要产生效果,您可以使用如下代码:

    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:CURLANIMATIONDURATIONFORSWITCHINGVIEWS];
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view cache:YES];
    
    [newlyVisibleController viewWillAppear:YES];
    [previouslyVisibleController viewWillDisappear:YES];
    [previouslyVisibleController.view removeFromSuperview];
    [self.view addSubview:newlyVisibleController.view];
    [previouslyVisibleController viewDidDisappear:YES];
    [newlyVisibleController viewDidAppear:YES];
    
    [UIView commitAnimations];
    

    【讨论】:

    • 感谢您的帮助!我会尝试这种方式。
    • 看来这还是做不到同样的效果....官方sdk还没有公开相关API。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-25
    • 2016-03-22
    • 1970-01-01
    • 1970-01-01
    • 2013-05-23
    相关资源
    最近更新 更多