Lion’s beautiful full-screen mode is off by default but it takes just one line of code to enable it in your app. Specifically, call [-setCollectionBehavior:] with the NSWindowCollectionBehaviorFullScreenPrimary flag on your main window. (By setting a window’s collection behavior to NSWindowCollectionBehaviorFullScreenAuxiliary, it can be shown on the same space as the fullscreen window; use this for secondary windows.). Update: You can also set the collection behavior in Interface Builder.
A window is taken into or out of fullscreen mode with the -toggleFullScreen: action. The NSWindowDelegate protocol was also extended by several new methods that inform the delegate about the entering and exiting of full-screen mode and allow it to set a custom content size and presentation options for full-screen display. You can also customize the animation into and out of full-screen mode with the following methods:
The NSApplication instance includes the NSApplicationPresentationFullScreen flag in its -presentationOptions when an app is currently in full-screen mode.
taken from http://oleb.net/blog/2011/07/whats-new-f...on-part-1/