i have a two-paned NSSplitView, one subview of it is an IKImageBrowserView. i need to capture a bitmap of it to swap into place before animating the NSSplitView with a CATransition.
using cacheDisplayInRect
does not capture the IKImageBrowserView contents, but does capture the other pane's contents fine. i'm thinking that this is likely do to with IKImageBrowserView having its own layer-tree.
can someone confirm that this is true ?
NSBitmapImageRep *imageRep = [self.imagesSplitView bitmapImageRepForCachingDisplayInRect:visibleRect];
[self.imagesSplitView cacheDisplayInRect:visibleRect toBitmapImageRep:rep];
NSImage *tempImage = [[NSImage alloc] initWithCGImage:[imageRep CGImage] size:visibleRect.size];
[self.tempView setImage:tempImage];
[self.holdingView replaceSubview:self.imagesSplitView with:self.tempView];
are there any suggestion about how i can get bitmap copy of the view contents ?
renderInContext
is not going to help me, i don't think, because IKImageBrowserView doesn't reveal methods for referencing its presentationLayer -- if it even has one.
i think ImageKit is a combination of CALayers/CAOpenGLLayers and alchemy.
thanks.