NSButton gets drawn inside custom NSCell, but is not actually clickable
I have a NSTableView which contains my custom NSCell subclass, IconCell. The IconCell contains three elements : an image, text, and a button. Here's a simplified version of my drawing code ( closeButton is the button): - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { NSPoint cellPoint = cellFrame.origin; [controlView lockFocus]; CGFloat buttonWidth = [closeButton frame].size.width; [someNSImage drawInRect:NSMakeRect(cellPoint.x, cellPoint.y, ICON_WIDTH, ICON_HEIGHT) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];