Thanks a lot for your response!
I apologize for bothering you (and anybody else),
because I have already found a solution myself.
For the record, I am currently using
[window_ toggleFullScreen: nil];
where window_ is what I get as parameter in
- (void) viewWillMoveToWindow: (NSWindow
> On May 1, 2020, at 12:34 PM, Gabriel Zachmann via Cocoa-dev
> wrote:
>
> Is there a way to switch programmatically to fullscreen (and back) by the app,
> and still get the same behavior as if the user clicked the green window
> button?
Something like this should work.
NSButton *button =
In my app, I defined a key that switches the window/view to fullscreen mode and
back.
Essentially, I use these commands:
[self enterFullScreenMode: [NSScreen mainScreen] withOptions: nil];
and
[self exitFullScreenModeWithOptions: nil];
where self is an NSView.
This seems