Under the attributes inspector, you need to provide the sort key and the selector (compare:). This will start sorting the table columns and you need to set this for each table column.
Also, for your reference you can get my sample code from: Project
Once the app is launched, you can click load drawer and load table and then click the header to sort the column. In this example I have set the sort key same as the value binding key.
I hope this helps.