ios - Can you detect when a UIViewController has been dismissed or popped? -


I have some cleanups that are dismissed / pop / unloaded at any time in my shared resource. goes ? This can be either when the user hits the back button on that individual screen, or if the popoutviewer is called for (in that case, I would ideally be able to clear each controller that was popped up.)

The obvious choice will be in the scene to do this, but of course, it is not like how unload works is a way of catching all cases where ViewController is sta Is removed?

EDIT: I forgot to mention that I am using zaminin so that the answer can have an impact on or not.

  override func viewDidDisappear (animated: boole) {if (self.isBeingDismissed ()} self .isMovingFromParentViewController ()) {// clear code here}}  

Comments