You are on the right track with identifiers. Here is how you use them.
First set up your NSTableView with specific row types (as you probably already did). In the screenshot below, I made one line with a title and description, and the other with several buttons.

Then you need to configure the desired identifiers. Click the first line in Interface Builder and select Identity Inspector. Select a unique identifier for the first row. Do the same for the other.

Finally, in your implementation, create a new line of a specific type using the following code:
TableViewController.m
#pragma mark - NSTableViewDelegate - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { NSTableCellView *cell; if(someCondition == YES) { cell = [self.tableView makeViewWithIdentifier:@"ButtonRow" owner:self]; } else { cell = [self.tableView makeViewWithIdentifier:@"TitleDescriptionRow" owner:self]; } return cell; }
If you're looking for a deeper guide, check out Cocoa Programming L51 - View-Based NSTableView (YouTube video, not me).
source share