NSTableView Scroll Row By Row

91 Views Asked by At

The app MacTracker has a list that scrolls in a "Row by Row" fashion: MacTracker scrolling

How can I implement this in an NSTableView?

There's a similar question from a while back, but I'd like to know how I can allow the top to be clipped at the bottom of the list if necessary

1

There are 1 best solutions below

0
Michael Berk On

In the comments above, I mentioned I had used the recommended strategy from the old post (override adjustScoll, provide it with a multiple of my row height) but had trouble with preventing cells from getting cut off at the end

The solution I've come up with after experimenting was to increase the bottom of the Clip View's content inset by the height of a row.

Note that this does prevent you from clicking on the bottom row when it's not scrolled to the bottom, but for my needs, that's not an issue