Cocoa 应用程序默认为全屏?
我看过大量关于向 NSWindow 添加控件以使其能够进入全屏的帖子 - 通过代码和 Interface Builder 设置。我正在寻找的是当应用程序启动时,它默认以全屏打开。
I've seen a ton of posts about adding a control to a NSWindow to give it the ability to go into full-screen — both through code and Interface Builder settings. What I'm looking for is when the application is launched, it opens in full-screen by default.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
设置主窗口的委托。如果您还没有窗口委托,则可以使用应用程序委托作为窗口委托。然后将此方法添加到窗口委托中:
Set your main window's delegate. You can use your app delegate as the window delegate if you don't already have a window delegate. Then add this method to the window delegate:
如果您正在为旧版本的操作系统编码。您可以使用下面的代码。此代码适用于 10.6 mac lion onwords。
If you are coding for older versions of OS. you can use the below code.This code will work from 10.6 mac lion onwords.