How to FullScreen Your Apps With Lion New API

99封情书 提交于 2019-12-06 11:04:03

问题


Lion support full screen app in the separate space. And It's cool to slide the space by gusture.

But I don't know how to make it for my own app.


回答1:


There are two ways to get your window to have the fullscreen button in the corner.

[[NSApplication sharedApplication] setPresentationOptions:NSFullScreenWindowMask];

and

[window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary];

I wrote a bit more about it in a blog post here




回答2:


See this document. Basically, you can call the toggleFullScreen: message on a window to put it into fullscreen mode.



来源:https://stackoverflow.com/questions/6909140/how-to-fullscreen-your-apps-with-lion-new-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!