且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

弹出动画在 UITabbarController 的第一个 UINavigationController 中不起作用

更新时间:2023-01-08 15:24:25

我知道我问了这个问题,也提供了同样的解决方案.我很久以前就问过这个问题,但我没有得到任何解决方案,因为存在不合逻辑的错误.并非每个 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];
}