How to create an NSImage from an NSView that isn't completely visible?
I have an NSView in an NSScrollView that I want to create a开发者_StackOverflown NSImage from. Because it's in an NSScrollView it's not always completely visible, and it can be even bigger that the screen's size. Can anyone help me? Thanks.
[NSView cacheDisplayInRect:toBitmapImageRep:]
Alternatively, depending on what you need the image for, consider making a PDF of the view.
精彩评论