I need to add a custom cell that will have a checkbox i.e. NSButton
and an NSImageCell
.
I searched and found I need to override NSBrowserCell
to achieve this, but the delegate method doesn't return any NSView
or NSCell
as it does in NSTableView
.
The delegate method reads like this:
- (void)browser:(NSBrowser *)sender
willDisplayCell:(NSImageCell *)cell
atRow:(NSInteger)row
column:(NSInteger)column{
NSBrowserCell *bcell = [[NSBrowserCell alloc] initImageCell:nil];
// cell = bcell;
}
It is obvious that I can not return the cell, then how do I update the cell?
The cell class of a
NSBrowser
can be changed by settingor with