UINavigationController在IOS7中崩溃

时间:2013-11-16 22:18:28

标签: ios uinavigationcontroller ios7 pushviewcontroller

当我在IOS7中测试我的应用程序时,它在我推送到NextView时崩溃了。启用Zombies后,我收到此错误。

[_UINavigationBarBackIndicatorView frame]: message sent to deallocated instance

我已经问过这个问题Here但是那个时候我不清楚为什么我的应用程序崩溃了问题,所以现在启用Zoombies之后我很清楚我的问题但是仍然不知道如何将Handel IOS7,因为我的应用程序已经在IOS6和IOS5上运行良好。我想添加一些代码,这将有助于debuging解决我的问题。在AppDelegate中,我将My Tabbar设置为root.please请参阅下面的代码

self.window.rootViewController = self.tabBarController;
        CATransition* transition = [CATransition animation];
        transition.duration = 0.5;
        transition.type = kCATransitionFade;
        [self.window.layer addAnimation:transition forKey: nil];

之后我正在使用我的UITabbarController和UInaviagtionController这样

- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
  {
 if(tabBarController.selectedIndex==1 || tabBarController.selectedIndex==3)
  {
    [(UINavigationController *)[tabBarController selectedViewController] popToRootViewControllerAnimated:NO];
  }
  }

- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
 {
   return YES;
 }

正如一些人说我的问题是关于rootViewController,所以请任何人建议我在我的Code.Thanks in Advance中做了什么错误。

0 个答案:

没有答案
相关问题