Note that there are some explanatory texts on larger screens.

plurals
  1. POViewcontrollers missing from the navigation stack
    text
    copied!<p>I am having a strange problem, that when executing one method and my viewcontrollers in the navigation stack goes missing. In the following piece of code, I log the viewcontroller count in the navigation stack. I am also logging the viewcontrollers in the navigation stack. </p> <pre><code>NSMutableArray *navigationarray = [[NSMutableArray alloc]initWithArray:self.navigationController.viewControllers]; NSLog(@"Navigation array %@", navigationarray); NSLog(@"Navigation array count %d", [navigationarray count]); [self.doneButton.target performSelector:self.doneButton.action withObject:self.doneButton.target]; NSMutableArray *navigationarrayOne = [[NSMutableArray alloc]initWithArray:self.navigationController.viewControllers]; NSLog(@"Navigation array %@", navigationarrayOne); NSLog(@"Navigation array count %d", [navigationarrayOne count]); </code></pre> <p>Before the method is called, the navigation stack has 3 viewcontrollers. But after the method is executed, there are no viewcontrollers in the navigation stack. I have put a breakpoint in the dealloc method of the 3 viewcontrollers and found that viewcontrollers are not being deallocated. What could be the reason for this?</p> <p>The current class subclasses <code>ABNewPersonViewController</code>..and <code>self.doneButton.action</code> executes </p> <pre><code>- (void)newPersonViewController:(ABNewPersonViewController *)newPersonViewController didCompleteWithNewPerson:(ABRecordRef)person; </code></pre> <p>method in a class that subclasses <code>ABPersonViewController</code></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload