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,
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()