NSWindow maximized?
문제
does anybody know a correct solution for this code?
BOOL maximized = [myWindow isMaximized];
해결책
Maybe take a look at isZoomed
다른 팁
If you want to maximize your NSWindow then you will have to set its frame size to the main screen size, as below
NSWindow* myWindow; //Your window object to maximize
[myWindow setFrame:[[NSScreen mainScreen] visibleFrame] display:YES];
There's not such thing as a maximized window in OSX. isZoomed is the closest approximation, but that also returns true:
- in full screen mode.
- for windows with NSBorderlessWindowMask style.
(tested with OS X 10.9)
제휴하지 않습니다 StackOverflow