PopToViewController pops in the wrong order?

Discussion in 'iOS Programming' started by fenrus110, Nov 24, 2008.

  1. fenrus110 macrumors regular

    Mar 24, 2008
    Anyone else experience this? I don't know if I am coding this wrong or anything, but when I use the popToViewcontroller or popToRootViewController, it seems to do it in the wrong order.

    ie, I have view controllers root-second-third

    In third if I use popToRootViewController or

    [self.navigationController popToViewController: [self.navigationController.viewControllers objectAtIndex:0] animated:YES];

    I NSLog the dealloc, I get

    dealloc second
    dealloc third

    When it should be the other way around...

Share This Page