Objective-c – How to make an undecorated window in Cocoa

cocoaobjective c

I like to create a Cocoa window without any chrome whatsoever. The only thing the user should see is what I draw.

I've discovered I can create a custom NSView but does this have to be in an NSWindow to display? If not, how can I display it without putting it in an NSWindow? If it does have to be in an NSWindow, how do I stop the window from drawing a title bar and other chrome?