NSBrowser Column titles not showing up.

-(nullable NSString*)browser:(NSBrowser*)sender titleOfColumn:(NSInteger)column
{
   return @"title";
}


No titles are showing up on screen. Just a blank gap where the titles go.

Hmm even though you cannot adjust the space in IB for the area where column titles go, coming out of Interface builder, if I resize the window, column titles suddenly shows up.

I found long ago that in Mac OS X 10.7 (Lion), you must set the Titled property of NSBrowser in Interface Builder; setting it in code in -awakeFromNib instead caused the column titles to disappear when the browser view was scrolled left or right. I haven't changed the code in my application since, because it works, so I don't know whether this problem still exists in more recent releases of macOS.

Pretty sure I did set the titled property in IB, i'll have to go back and check the nib.


I also noticed another issue. Even though my browser is set to *not* take the title from the previous column, sometimes it does, until I force it to redraw by resizing the window, then the title I return in the delegate method shows up.

NSBrowser Column titles not showing up.
 
 
Q