I am currently trying to learn a bit of Cocoa (using the book Cocoa Programming for Mac OS X). In one of the exercises, we set up a NSTableView with only one column, to act as a
This is just an IB problem that happens all the time (I'm not sure why). To solve this, simply just resize the table view to the size smaller than the 2nd column, then drag it back to the size you want and the 2nd column will disappear.
I had to use both steps - sam's answer + the comment by David Douglas.
[tableView setColumnAutoresizingStyle:NSTableViewUniformColumnAutoresizingStyle];
[tableColumn setResizingMask:NSTableColumnAutoresizingMask];
//AND
[tableView sizeLastColumnToFit];
Here's how I did it in Xcode 4.6...
In IB, select the table view and go to the Attributes Inspector. Choose 'Uniform' for 'Column Sizing'. Then, select the table column and choose 'Autoresizes with Table' for 'Resizing'.
These options correspond to:
[tableView setColumnAutoresizingStyle:NSTableViewUniformColumnAutoresizingStyle];
[tableColumn setResizingMask:NSTableColumnAutoresizingMask];