How to FullScreen Your Apps With Lion New API

2019-04-15 04:16发布

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.

2条回答
【Aperson】
2楼-- · 2019-04-15 04:49

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

查看更多
孤傲高冷的网名
3楼-- · 2019-04-15 05:01

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

查看更多
登录 后发表回答