nstableviewnstablecellviewnstablerowview

Notification for new NSTableView Group Row


I'm looking to change the look of my row view when it becomes a group row, or possibly more specifically when it becomes the group row that is stuck at the top of the NSTableview.

I wondered if there was a notification or some property that could be checked. Ideally I'd like to do some kind of animation as it gets within range of the top from one view to the next.

I'm thinking along the lines of tracking the row views coordinates in relation to the clip view/scroll view... Would that be the approach you would take?

Any suggestions?


Solution

  • when it becomes a group row

    Are you expecting a row to change whether it is a group row over time?

    I'm looking to change the look of my row view […] when it becomes the group row that is stuck at the top of the NSTableview.

    Have the row view's -drawRect: method consult its own floating property and draw differently based on its value. You may need to override the -setFloating: setter to mark your row view as needing display, too.