bitmapImageRepForCachingDisplay(in:)
Returns a bitmap-representation object suitable for caching the specified portion of the view.
Declaration
func bitmapImageRepForCachingDisplay(in rect: NSRect) -> NSBitmapImageRep?Parameters
- rect:
A rectangle defining the area of the view to be cached.
Return Value
An autoreleased NSBitmapImageRep object or nil if the object could not be created.
Discussion
Passing the visible rectangle of the view ([self visibleRect]) returns a bitmap suitable for caching the current contents of the view, including all of its descendants.