【发布时间】:2020-05-01 19:34:05
【问题描述】:
我正在 Xcode5 中为 Mac OSX 开发应用程序
我想全屏显示我的第一个窗口(没有工具栏,只有我的视图)
我找到了一种在角落显示全屏按钮的方法:
AppDelegate.m:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
screenFrame = [[NSScreen mainScreen] frame];
[self.window setBackgroundColor: NSColor.whiteColor];
[self.window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
[[self window] setFrame:screenFrame display:YES];
}
但要获得全屏,我必须点击角落的按钮
如何全屏保存按下该按钮的步骤?
【问题讨论】:
标签: macos fullscreen nswindow