NS Table sorting sorts the array itself ?

Looking through info for sorting by column, I've seen mentioned that the data array is sorted then the data is reloaded into the table ? Also a mention that if I bind through IB to an array controller it does not sort the original array ?


One more thing .. The array I'm using is a struct which I'm not too sure about using, the only examples I've seen are single structured arrays.

Answered by PBK in 350956022

A UITableView displays a table of cells. The content of each cell in the table is determined by s call to the method cellAtTableIndex. That method determines what to display by looking at an array. So, to sort a table you first sort the array and then you re-display the table. You re-display a table by calling reloadData.

Accepted Answer

A UITableView displays a table of cells. The content of each cell in the table is determined by s call to the method cellAtTableIndex. That method determines what to display by looking at an array. So, to sort a table you first sort the array and then you re-display the table. You re-display a table by calling reloadData.

NS Table sorting sorts the array itself ?
 
 
Q