我不知道我的代码有什么问题.我已经成功开发了应用程序,除了我第一次启动应用程序时,所有的东西都工作正常,在侧面第一个导航控制器中,弹出动画不能正常工作.似乎 Pop 没有动画
.当我更改标签并返回第一个标签时,它工作正常.并做 push-pop
然后它的工作正常.
I don't know what is wrong with my code. i have developed app successfully and all the things working fine except when i launch app first time, In side first navigation controller, the pop animation is not working fine. it seems that Pop without animation
. and its working fine when i changed the tab and come back on first tab. and doing push-pop
then its working fine.
我从一周开始就试图找出问题所在.但由于代码冗长而无法成功.我已经尝试过创建 Tabbar Demo
的相同动画并且它工作正常.
I tried to figure out problem since week. but could't get success because of lengthy code. I have tried the same animation with creating Tabbar Demo
and its working fine.
我的应用具有以下层次结构.
My app has following hierarchy.
UINavigationController --> UIViewController --> UITabbarController --> Four UINavigationController --> UIViewControlle.
我在 storyboard
中使用了 UITabbarController
.
我知道我问了这个问题,也提供了同样的解决方案.我很久以前就问过这个问题,但我没有得到任何解决方案,因为存在不合逻辑的错误.并非每个 Tabbar
基础应用程序都有相同的.在这里,我添加了经过长时间调试的解决方案,我发现即使是单行也可能会破坏您的项目.
I know that i asked the question and also provide solution for same. I have asked this question long time ago and i am not getting any solution for this because there is illogical bugs. Not every Tabbar
base application have same. Here i am adding solution that is result of long time debugging and i found that even single line can break your project.
实际上我已经从情节提要中添加了 UITabbarController
并以编程方式创建了 UITabbarController
类,并在 storyboard
UITabbarController 进行类型转换>.
Actually i have added UITabbarController
from storyboard and programmatically created UITabbarController
class and type cast it with UITabbarController
inside storyboard
.
我的问题是,我忘了在 -(void)viewDidAppear:(BOOL)animated
方法中写 [super viewDidAppear:animated];
.所以我会第一次打破流行动画然后它会正常工作.
Here my problem is, i forgot to write [super viewDidAppear:animated];
inside -(void)viewDidAppear:(BOOL)animated
method. so i will break pop animation first time then it will work fine.
得到这个解决方案后,我什至不知道这一行如何影响整个代码.但我不希望其他人浪费时间来找出这样的单行(意外问题)问题.所以我在这里添加这段代码.
After getting this solution, even i don't know how this line affect whole code. but i don't want the other people to waste their time to find out such single line (unexpected issue) problem. so here i am adding this code.
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
}
这篇关于弹出动画在 UITabbarController 的第一个 UINavigationController 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!