title: ios: waiting for method to finish executing before continuing
body: <p>I am new to IOS development and am currently facing a problem.</p>
  
  <p>When method A is called, it calls method B and then it wait for delegate <code>connectionDidFinish</code> which <code>connectionDidFinish</code> will execute MethodC.</p>
  
  <p>My question is how do I ensure that methodA to methodC has finished executing before executing NSLog?</p>
  
  <p>I found that a way to solve this problem is to use notification center. Send notification to me after finishing executing methodC. I don't think this is a good solution. Is there another way to do this?</p>
  
  <p>Example:</p>
  
  <pre><code> [a methodA];
   NSLog(@"FINISH");
  </code></pre>