I have an NSTableview in view based mode, in it I have custom NSTableViewCells. Each cell has a button, but I only want the button to be displayed if the cell is selected. So when the cell becomes deselected I want to hide the button. I have tried to iterate through each row unsuccessfully and am unsure as to how to go about this.
This is what I'm doing to show the button
-(void)tableViewSelectionDidChange:(NSNotification *)notification
{
...
//Hide / show dropdown menus
NSInteger selected = [_tableView selectedRow];
CustomCell *cell = [_tableView viewAtColumn:0 row:selected makeIfNecessary:NO];
[cell setIsMenuHidden:NO];
}