title: cocoa: how to render view to image?
body: <p>I want to know is there any method to render a view to image? just like a screenshot, but I can specify any view to that method. I know how to do it in ios. <a href="https://stackoverflow.com/questions/4213529/saving-uiview-contents-in-ios-4-with-real-size-of-the-images-inside-i-e-scale">Saving view content</a>, but how can I do it in mac os ?</p>