问题
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