> On May 1, 2020, at 12:34 PM, Gabriel Zachmann via Cocoa-dev > <cocoa-dev@lists.apple.com> 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 = [self.window standardWindowButton:NSWindowZoomButton]; NSCell *cell = button.cell; [cell.target performSelector:cell.action]; Where self is the NSView object. --Richard Charles _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com