ikimagebrowsercell

How to customize IKImageBrowserView to add a NSButton on each item?

删除回忆录丶 提交于 2019-12-02 01:49:23
问题 I want to customize IKImageBrowserView so that i can add NSButton or other control on cell of IKImageBrowserView. I tried to cutomize IKBrowserViewCell class, but i did not get how and where i add NSbutton, So that it display on IKBrowserViewItem. Here is the code i had tried till now. #import "ImageBrowserView.h" #import "ImageBrowserCell.h" - (IKImageBrowserCell *) newCellForRepresentedItem:(id) cell { return [[ImageBrowserCell alloc] init]; } In cell class - (CALayer *) layerForType:

How to customize IKImageBrowserView to add a NSButton on each item?

独自空忆成欢 提交于 2019-12-02 01:48:44
I want to customize IKImageBrowserView so that i can add NSButton or other control on cell of IKImageBrowserView. I tried to cutomize IKBrowserViewCell class, but i did not get how and where i add NSbutton, So that it display on IKBrowserViewItem. Here is the code i had tried till now. #import "ImageBrowserView.h" #import "ImageBrowserCell.h" - (IKImageBrowserCell *) newCellForRepresentedItem:(id) cell { return [[ImageBrowserCell alloc] init]; } In cell class - (CALayer *) layerForType:(NSString*) type { CGColorRef color; //retrieve some usefull rects NSRect frame = [self frame]; NSRect