I’m writing a small application that runs as a OS X status bar app, and what to be able to create a preferences window from the app. I’m able to create and display the window, but it always appears underneath other windows. I’ve created the window in the main .xib file, and assigned to the window property of my app delegate. When I want to display the preferences window, I do this:
[window makeKeyAndOrderFront:self];
As mentioned above, this seems to add the window to the back of stack of windows. I’ve tried a variety of the layer method too, and none seem to change that.
Any help would be appreciated.
I had this exact problem a while back.
makeKeyAndOrderFront:only brings the window to the front of the application, you need to bring the entire application to the front by callingafter
makeKeyAndOrderFront:.Happy coding!
Billy