简体   繁体   English

如何在uitabbarcontroller中的一个视图与另一个视图之间制作动画

[英]how to make the animation between one view to another view in uitabbarcontroller

I want the animation between the two viewcontrollers in uitabbarcontroller. 我想要uitabbarcontroller中的两个viewcontrollers之间的动画。

I am having the two tabbar. 我有两个标签栏。 The first one open by default when run the app.I want the animation,while i go to the second tabbar.How can i do this. 默认情况下,第一个在运行应用程序时打开。我想要动画,而我转到第二个标签栏。我该怎么做。

Thanks 谢谢

In the View Will appear of your firstViewController you should have something like 在firstViewController的“视图将出现”中,您应该有类似

- (void)viewWillAppear:(BOOL)animated
{
     [super viewWillAppear:animated]; 

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:1.0];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight
                           forView:self.view cache:YES];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
    [UIView commitAnimations]; 

}

Then in the secondviewcontroller have the same thing but UIViewAnimatinTransitionFlipFromleft 然后在secondviewcontroller中具有相同的东西,但UIViewAnimatinTransitionFlipFromleft

However let me know how this goes, because for some reason in the app I was making I had a little trouble on the view first transition then it would work fine after that. 但是,请让我知道这是怎么回事,因为由于某种原因,我在应用程序中使我在视图第一次转换时遇到了一些麻烦,然后在此之后仍然可以正常工作。 If you suffer from the same problem maybe we can work together for a solution. 如果您遇到相同的问题,也许我们可以共同寻求解决方案。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 一个视图上的肖像UITabBarController,另一视图上的风景视图,不起作用 - Portrait UITabBarController on one view, Landscape view on another UIView, not working 无法使用 UITabBarController 将一个视图 controller 发送到另一个视图 controller - Not able to sent one view controller to another view controller using UITabBarController 如何使UITabBarController懒惰地加载视图控制器? - How to make UITabBarController load view controllers lazily? 如何将UITabBarController的一个选项卡视图文本字段值发送到另一个选项卡视图标签。 - how to send UITabBarController one tab view textfield value in to another tab view label. 如何将UITabBarController设置为View? - How to set UITabBarController to View? 在标准视图和UITabBarController视图之间转换? - Transition between a standard view and UITabBarController view? 如何在UITabBarController上设置另一个视图的对象的.hidden属性 - How can I set the .hidden property of an object of another view on a UITabBarController 如何使UITabbarcontroller显示在所有其他视图控制器上? - How to make UITabbarcontroller show over all other view controllers? 如何使UITabBarController的“更多”按钮返回到根视图 - How do you make the “more” button of a UITabBarController return to the root view 如何使用UITabBarController在applicationDidBecomeActive上显示视图 - How to display view on applicationDidBecomeActive with UITabBarController
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM