Reputation: 153
I'm creating a time tracker application for mac. I used the following code to run the application on full screen mode and it works perfectly.
[[self.window contentView] enterFullScreenMode:[NSScreen mainScreen] withOptions:nil]
but still the application can be closed with cmd+q. Is there any way that i can prevent from closing the application?
Upvotes: 2
Views: 2108
Reputation: 756
In the main xib file you have the main menu.
Under the first menu item (the name of the app), you have the quit option.
Simply removing that menu item solve your problem.
If you prefer, you can only remove the shortcut.
Upvotes: 5