How to update NSTableView without using -reloadData?

前端 未结 5 1796
猫巷女王i
猫巷女王i 2021-02-02 15:29

I am new to the Mac. I am trying to update a particular cell in NSTableView without using -reloadData, as -reloadData updates the whole table. I have t

5条回答
  •  無奈伤痛
    2021-02-02 15:39

    Have a look at reloadDataForRowIndexes:columnIndexes: method. To update a single cell the following should work:

    [yourTable reloadDataForRowIndexes:[NSIndexSet indexSetWithIndex:row]  
                         columnIndexes:[NSIndexSet indexSetWithIndex:column]];
    

提交回复
热议问题