According to the documentation:https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/TableView/SortingTableViews/SortingTableViews.htmlsetting the table column's sortDescriptorPrototype property doesn't tell the table view that the data is sorted on that column. It just tells the table view what sort descriptor to use when the user clicks on that column header.To get the result you want, it looks like you also need to set the table view's sortDescriptors to an array whose first element is the column's sort descriptor. Unfortunately, the documentation isn't very clear on this point, so you may have to experiment a bit, to get your code to do what manually clicking on the column header does.
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: