Iphone application crashes when poping to rootController of UITabBar tab

Posted by sniurkst on Stack Overflow See other posts from Stack Overflow or by sniurkst
Published on 2009-08-12T14:03:44Z Indexed on 2010/05/11 0:24 UTC
Read the original article Hit count: 576

Filed under:
|
|
|

Hello,

I'm having this bug I can't figure out and it is making my head hurt. So, basically, in my iphone application I have UITabBar with some tabs each having UINavigationControllers inside.

Something like this:

    someViewController *someController = [[someViewController alloc] myInit];
    UINavigationController *someNav = [[UINavigationController alloc] initWithRootViewController:someController];
    tab = [[UITabBarController alloc] init];
    tab.viewControllers = [NSArray arrayWithObjects:otherNav, otherNav, evilNav, nil];
    [window addSubview:tab.view];

So to reproduce my "precious" bug I go like this:

click evilNav tab 
-> push tableListView (category list)
-> push otherTableListView (category items list) 
-> push someOtherView (single item)
-> popToRoot || popToController withindex:0 || click on evilNav tab again || pop to otherTableListView -> pop to tableListView
-> crash (with no notable error)

So if I go so far to someOtherView I can't go back to first tableListView (rootViewController) without application crashing. Meanwhile I can go to other tabs and then even click evilNav (when it is in otherTableListView or someOtherView state) without crashing.

What could be causing this problem? (If you need I will post more code)

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk