title: How can I make a MenuBar app (using Swift) that has more than just a list of menu items?
body: <p>I'm new to OSX development (I've done a little iOS stuff, but this is my first OSX app, and my first Swift app).</p>
  
  <p>I've found several tutorials for how to make a MenuBar app with just a simple list of menu items, like the following:</p>
  
  <p><img src="https://i.stack.imgur.com/CM78G.png" alt="simple menu"></p>
  
  <p>But I'm looking for something more like Evernote's, or Google Drive's, or Mint's MenuBar window:</p>
  
  <p><img src="https://i.stack.imgur.com/Wq2Sn.png" alt="window"></p>
  
  <p>I believe that to do something like the latter, I need a regular NSWindow that is just toggled by clicking the status item (right?), but how do I go about positioning the window the way Evernote &amp; Google do?</p>
  
  <p>I've found <a href="https://stackoverflow.com/questions/1301701/how-to-get-the-on-screen-location-of-an-nsstatusitem">this question</a> that gives a couple of ways to get the status item position, if using an Objective C app, but I'm not sure how to translate that to a Swift app.  For example, one answer suggests using the following to get the frame of the status item after clicking on it:</p>
  
  <pre><code>[[[NSApp currentEvent] window] frame]
  </code></pre>
  
  <p>but, in Swift, NSApp.currentEvent does not have a member named "window"...</p>
  
  <p>Does anyone know of any example MenuBar apps, written in Swift, that have more than just a simple list of menu items?  Is such a thing simply not possible with Swift, yet?</p>
  
  <p><br>
  <strong><em>UPDATE:</em></strong><br>
  Since the examples and starter apps that do this kind of thing in Objective C are abundant, and there's little or nothing on how to do it in Swift, I ended up abandoning the Swift route and built an Objective C app, instead.  I used this one as a starter: <a href="https://github.com/shpakovski/Popup" rel="nofollow noreferrer">https://github.com/shpakovski/Popup</a>.  It was very quick/easy to get started and ended up being a lot less work than a Swift app would have been.</p>
  
  <p>Maybe one day when Swift is more mature, I'll try another one in that language.</p>