Search code examples
iosios7viewcontrollernavigationcontroller

How to select ViewController?


  1. The app starts on ViewContoller
  2. I push TutoViewContoller
  3. On some action, I pop TutoViewContoller

I would like to call a method of ViewContoller just after popping TutoViewController. How can I do that ?


Solution

  • You can implement viewWillAppear of ViewController. If you really need to distinguish between TutoViewController and other viewcontroller you have many options to call before you pop it: delegate pattern, passing reference of ViewController to TutoViewController etc.