场景如标题

这样不行:

[self.navigationController popToRootViewControllerAnimated:YES];

MainViewController *mainCtrl = [(AppDelegate *)[UIApplication sharedApplication].delegate mainCtrl];

mainCtrl.selectedIndex = 3;

这样tabbar 怎么都不会出来的。。

 

这样才可以。。可能还是 这个 层次结构 apple 内部的执行 有些问题吧

[self.navigationController popToRootViewControllerAnimated:YES];

 [self performSelector:@selector(test) withObject:nil afterDelay:0];

 

- (void)test

{

    MainViewController *mainCtrl = [(AppDelegate *)[UIApplication sharedApplication].delegate mainCtrl];

    mainCtrl.selectedIndex = 3;

}

 posted on 2015-06-19 14:06  PoloKey  阅读(248)  评论(0编辑  收藏  举报