Xcode 全屏窗口没有标题栏
我想创建一个全屏应用程序(mac),但即使我有全屏窗口; [window setFrame:[window frameRectForContentRect:[[window screen] frame]]display:YES animate:YES];
我无法摆脱标题栏?您可以更改上面的代码以使窗口没有标题栏还是必须完全不同?谢谢 :)
I would like to create a full screen application (mac) but eventhough I have the window fullscreen;[window setFrame:[window frameRectForContentRect:[[window screen] frame]]display:YES animate:YES];
I can't get rid of the title bar? Can you change the above code to make the window without a titlebar or do you have to do it completely different? Thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
CocoaWithLove 有一篇关于它的好文章:
http://cocoawithlove .com/2009/08/animating-window-to-fullscreen-on-mac.html
CocoaWithLove has a good article about it:
http://cocoawithlove.com/2009/08/animating-window-to-fullscreen-on-mac.html
我使用窗口级别
NSScreenSaverWindowLevel
成功地将窗口放置在标题栏上,而不是 Macmade 的答案中建议的NSFloatingWindowLevel
。I successfully placed the window over the titlebar using the window level
NSScreenSaverWindowLevel
, instead ofNSFloatingWindowLevel
suggested in Macmade's answer.