Cocoa - go to foreground/background programmatically

前端 未结 3 1947
北恋
北恋 2020-12-05 09:12

I have an application with LSUIElement set to 1. It has a built-in editor, so I want the application to appear in Cmd+Tab cycle when the editor is open.

             


        
3条回答
  •  有刺的猬
    2020-12-05 09:37

    You can set App "Application is agent (UIElement)" to YES in your plist file.

    EDIT:

    I think there are some hacks to do this. But it's really not the way it's meant to be. Cmd+tab is for getting an application to foreground, but if you don't have a menu bar, it doesn't look like foreground to the user.

    I'd rather make a menu bar to access the app.

提交回复
热议问题