有没有任何例子,如何在Ojective-C和Cocoa中为Mac OS X编写全屏应用程序? [英] Are there any example on how to write full-screen apps for Mac OS X in Ojective-C with Cocoa?

查看:134
本文介绍了有没有任何例子,如何在Ojective-C和Cocoa中为Mac OS X编写全屏应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能告诉我如何使用Cocoa在Ojective-C中为Mac OS X编写全屏应用程序的示例吗?

Could someone point me to any examples on how to write full-screen apps for Mac OS X in Ojective-C with Cocoa?

推荐答案

将以下代码添加到您想要全屏的NSView:

Add the following code to the NSView you want to make fullscreen:

[view enterFullScreenMode:[NSScreen mainScreen] withOptions:nil] ;

[view enterFullScreenMode:[NSScreen mainScreen] withOptions:nil];

这是完全一样的,唯一需要注意的是,如果你有任何NSWindow特定的代码...

It's exactly the same, the only thing you need to watch for is if you have any NSWindow specific code...

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html

这篇关于有没有任何例子,如何在Ojective-C和Cocoa中为Mac OS X编写全屏应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆