Reordering rows in a view-based NSTableVIew

Discussion in 'Mac Programming' started by monsieurpaul, Jul 18, 2012.

  1. monsieurpaul macrumors regular

    Oct 8, 2009
    Hello all,

    I'm toying with the view-based NSTableView and I'm looking for a way of reordering rows by draging them with mouse.

    However I can't find any documents/guides/tutorials about this.

    Thank you,

  2. GorillaPaws macrumors 6502a


    Oct 26, 2003
    Richmond, VA
    Take a look at Apple's NSTableViewDataSource Protocol Reference under the "Drag and Drop" section. There is an Apple sample project called TableViewPlayground that implements a view-based drag/drop NSOutlineView, which is just a subclass of NSTableView, so you should be able to see how it's done there.
  3. monsieurpaul thread starter macrumors regular

    Oct 8, 2009
    Thanks for the input. Indeed, the TableViewPlayground and some documents form WWDC2011 were very helpful.

Share This Page