My view controller needs to know when it is popped out of the navigation controller stack, so that it can retain itself, wait and release itself later with another notification.
I intend to do like that when the view is sent dealloc message:
- (void)dealloc {
if (self.isPerformingSomeTask) {
self.isPopedOut = YES;
[self retain];
return;
}
[super dealloc];
}
But I think this is not a good solution?
This is an extremely bad idea.
EDIT: The following code refers to my comment below:
So you code should look like this