对< TSActivityMapVC:0x81b1000>的开始/结束外观转换的不平衡调用。 [英] Unbalanced calls to begin/end appearance transitions for <TSActivityMapVC: 0x81b1000>

查看:137
本文介绍了对< TSActivityMapVC:0x81b1000>的开始/结束外观转换的不平衡调用。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我初始化 UITabBarController 其中每个标签包含 UINavigationController 和每个 UINavigationController include UIViewController
UIViewController 我做的事情

When I init UITabBarController where each tab include UINavigationController and each UINavigationController include UIViewController when in UIViewController I do something like

TSActivityDetailsVC * c = [[TSActivityDetailsVC alloc] initWithNibName:@"TSActivityDetailsVC" bundle:nil];
[self.navigationController pushViewController:c animated:YES];

我有动画,但是当我按下后退按钮 - 我没有动画并且得到错误

I have animation, but when I press back button - I not have animation and get error

日志:

push view controller
Unbalanced calls to begin/end appearance transitions for <TSActivityMapVC: 0x81b1000>.
back btn pressed
Unbalanced calls to begin/end appearance transitions for <TSActivityDetailsVC: 0x81c85d0>.

初始代码:

-(UITabBarController *) createMainTabBarController{
UITabBarController * tabbarCntr = [[UITabBarController alloc] init];
[tabbarCntr setViewControllers:[NSArray arrayWithObjects:
                                [[UINavigationController alloc] initWithRootViewController:[[TSActivityMapVC alloc] init]],                                    
                                [[UIViewController alloc] init],
                                [[UIViewController alloc] init],
                                [[UIViewController alloc] init],
                                [[UIViewController alloc] init]
                                , nil]];
[tabbarCntr.tabBar setSelectionIndicatorImage:[UIImage imageNamed:@"selection_indicator"]];
[tabbarCntr.tabBar setBackgroundImage:[UIImage imageNamed:@"tabbar_background"]];    

return tabbarCntr; 
}

TSActivityMapVC I perfom

in TSActivityMapVC I perfom

TSActivityDetailsVC * c = [[TSActivityDetailsVC alloc] initWithNibName:@"TSActivityDetailsVC" bundle:nil]; 
[self.navigationController pushViewController:c animated:YES];

令人惊讶的是,当我转到另一个标签并返回 - 之后 - 一切正常而且没有错误

surprisingly that when I go to another tab and return - after it - all works fine without errors

推荐答案

我得到了解决方案!我将 UITabBarController 子类化,忘了调用超级 viewWillAppear 。因此 UITabBarController 的过渡动画未完成。

I got the solution! I subclasses the UITabBarController and forgot to call the super of viewWillAppear. So the transition animation of the UITabBarController not finished.

这导致不平衡调用开始/结束外观!

This caused the the "Unbalanced calls to begin/end appearance"!

这篇关于对&lt; TSActivityMapVC:0x81b1000&gt;的开始/结束外观转换的不平衡调用。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆