0

I am creating an OSX App in Swift.

What I want is: when I press the icon in the mac top bar I want the window to be exactly underneath the icon like most preferences app do.

Thanks,

fredsco
  • 313
  • 4
  • 19

1 Answers1

1

You can get the position of the mouse when the user clicks the statusbar and then you know where you can put your window:

NSEvent.mouseLocation()
Jonas
  • 2,139
  • 17
  • 38