title: How can I get the delegate?
body: <p>In iOS to get the delegate I use following code:</p>
  
  <pre><code>AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication] delegate];
  </code></pre>
  
  <p>How to get the delegate in Cocoa Mac programming?</p>