I have been trying to make my Mac application enter fullscreen now for a while but can't get it to work. According to the Apple developer center, I should use enterFullScreenMode:withOptions: which gives me, method enterFullScreenMode not found.
Everywhere I google there seems to be people having issues with making their app fullscreen, so what is the way to make it work?
Edit:
Of course enterFullScreenMode
is for the NSView
and I used it on a NSWindow
; it's not the view I want to have fullscreen, but the window. I can't find any function for the NSWindow
though.
On your Mac, move the pointer to the green button in the top-left corner of the window, then choose Enter Full Screen from the menu that appears or click the button .
Go to Window 2, move the cursor over the top-left corner, hold the Shift key and resize the window to match its left-side edge with the right-side edge of the Window 1. 3. Use Command + ` keyboard shortcut to switch to Window 1, hold the Option key and press the green dot to fit the window to the screen.
To enter full screen in an app that supports it, press Control-Command-F. You can also navigate to the green full-screen button in the top-left corner of the app window, then press Command-Space bar. The full-screen button can also expand (or maximize) the window.
Lion has some new APIs for full screen.
To do it with NSWindow, do this
[window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary];
To do this with NSApplication do this
[[NSApplication sharedApplication] setPresentationOptions:NSFullScreenWindowMask];
A bit more about it here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With