how a view controller know when it is dismissed or poped out of the navigation controller stack?
Posted
by Thanh-Cong Vo
on Stack Overflow
See other posts from Stack Overflow
or by Thanh-Cong Vo
Published on 2010-05-05T10:33:28Z
Indexed on
2010/05/06
8:08 UTC
Read the original article
Hit count: 407
iphone
|objective-c
Hi all,
My view controller needs to know when it is poped 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? Any idea?
© Stack Overflow or respective owner