如何在xcode中获取屏幕的当前尺寸,以便根据分辨率调整NSRect大小,使其最大化或占据整个屏幕?我需要添加什么?是需要添加到NSWindow吗?
NSRect panelRect = [[self window] frame];
panelRect.size.height = _HEIGHT;
panelRect.size.width = _WIDTH;
panelRect.origin.x = 0;
panelRect.origin.y = 0;
[[self window] setFrame:panelRect display:NO];
谢谢!