title: Calling methods of view controller from app delegate class
body: <p>When my app will enter foreground, I need to call some methods of my view controller from the app delegate class. How is the best way to realise it?</p>
  
  <p>I try to create a "fake" notification in "applicationWillEnterForeground" method:</p>
  
  <pre><code>[NSNotificationCenter defaultCenter]postNotificationName:@"test" object:nil];
  </code></pre>
  
  <p>And add observer in view controller:</p>
  
  <pre><code>[self addObserver: self selector:@selector(testMethod) name:@"test" object:nil];
  </code></pre>
  
  <p>Is this OK? Another method there: <a href="https://stackoverflow.com/questions/18950670/calling-uiviewcontroller-method-from-app-delegate">Calling UIViewController method from app delegate</a></p>
  
  <p>Which approach is better and why?</p>
  
  <p>PS Sorry for my bad english.</p>