I have a view-based NSOutlineView
that I am providing a custom view (a subclass of NSTableCellView
) for one of the columns. I am registering this subview using:
let nib = NSNib(nibNamed: "MyMatcherView", bundle: NSBundle.mainBundle())
outlineView.registerNib(nib, forIdentifier: "matcher")
When I call outline.makeViewWithIdentifier("matcher")
, it successfully returns me an instance of my custom view. Yay!
In Interface Builder, though, I've noticed that I can totally delete the NSTableCellView
control from the matcher
column (see below).
Two questions arise:
- I assume that it works at runtime because the call to
registerNib()
tells the table to use that nib, instead of the one that would have been defined by Interface Builder. Is this correct? - In the context of me providing a custom view, what is the
Text Cell
control that you can see in the screenshot below. I can't delete it, and I am not really sure what it is representing.