Reordering rows in a view-based NSTableVIew

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

  1. macrumors regular

    Joined:
    Oct 8, 2009
    #1
    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,

    Paul
     
  2. macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #2
    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. thread starter macrumors regular

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

Share This Page