title: MacOS Animation delay in swift
body: <p>Is it possible to add a delay to an animation with Cocoa?
  In my current code it shows a window and hides it with fade animation. What I am trying to do is add a delay before the fade animation.</p>
  <pre><code>   @IBAction func doIt(_ sender: NSButton) {
         openPanel()
  
         NSAnimationContext.runAnimationGroup { (cont) in
             cont.duration = 1.0
             self.panel.animator().alphaValue = 0
         }
         //hide on completion
     }
  </code></pre>