iPhone TabBarController动画

iPhone TabBarController动画,iphone,objective-c,animation,uitabbarcontroller,transition,Iphone,Objective C,Animation,Uitabbarcontroller,Transition,我正在构建一个iPhone应用程序,它似乎有一个相当非正统的导航布局。整个东西都建立在UITabBarController之上,但我修改了第一个视图的边界,以使选项卡栏“消失”。为了离开第一个页面,用户没有使用选项卡栏,而是单击我放在屏幕右下角的信息按钮。单击该按钮后,我将其设置为运行以下代码: self.tabBarController.view.bounds = CGRectMake(0, 0, 320, 480); [UIView beginAnimations:nil context:N

我正在构建一个iPhone应用程序,它似乎有一个相当非正统的导航布局。整个东西都建立在UITabBarController之上,但我修改了第一个视图的边界,以使选项卡栏“消失”。为了离开第一个页面,用户没有使用选项卡栏,而是单击我放在屏幕右下角的信息按钮。单击该按钮后,我将其设置为运行以下代码:

self.tabBarController.view.bounds = CGRectMake(0, 0, 320, 480);
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view.window cache:YES];
self.tabBarController.selectedIndex = 1;
[UIView commitAnimations];
self.tabBarController.view.bounds = CGRectMake(0, 0, 320, 575);
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view.window cache:YES];
[UIView commitAnimations];
该代码将视图的右下角卷起,显示UINavigationController的视图嵌入到UITabBarController的第二个选项卡中,并使选项卡栏重新出现。我非常非常满意动画,它将我从最初的视图带到了UINavigationController。然而,我似乎不明白的是,当我点击与原始视图对应的选项卡时,如何反向执行相反的动画。到目前为止,我已经尝试了几种实现此代码的不同方法:

self.tabBarController.view.bounds = CGRectMake(0, 0, 320, 480);
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view.window cache:YES];
self.tabBarController.selectedIndex = 1;
[UIView commitAnimations];
self.tabBarController.view.bounds = CGRectMake(0, 0, 320, 575);
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view.window cache:YES];
[UIView commitAnimations];
视图将出现
视图显示
方法中,动画通过在自身图像上设置视图动画来运行(因此它会向下卷曲,但在卷曲时,您可以看到它下面的视图是同一视图)。我特别寻找一种方法来实现同样的事情,但下面的视图是我刚从UITabBarController获得的任何视图

TLDR;我想实现一个向上卷曲、向下卷曲的动画转换,从一个视图到一个UITabBarController的一部分,但需要看起来不是这样