1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

View-based table view losing selection highlight

Discussion in 'Mac Programming' started by Starfox, Nov 26, 2012.

  1. macrumors regular

    #1
    I have a view-based NSTableView and when the selection changes I send a reloadData message to it. When it was cell-based the selected rows would maintain their highlight, after I moved it to being view-based the selected rows no longer keep their highlight. Any ideas?
     
  2. macrumors 6502a

    #2
    If you're using bindings, does the array controller have the "preserve selection" attribute checked in IB?
    But I think I'm seeing the same behavior where -reloadData would deselect rows even though "preserve selection" is on. It should be possible to keep a reference to the array's selected objects (via the -selectedObjects key) and select them again.
     

Share This Page