I have a view-based NSTableView, there are multiple rows (e.g, 20), everytimes when i scroll down the scroller, i want it to scroll to the next row.
For example, right now row 5 is selected, then scroll down will select row 6. But right now, the scroll view can stop in the center between row 5 and row 6.
So my question is that is there any way to set "scroll step", when cell height is 50, then scroll up/down 50 every time.
NotificationCenter.default.addObserver(self,
selector: #selector(scollDidEnd(_:)),
name: NSScrollView.didLiveScrollNotification,
object: tableView.enclosingScrollView)
@objc func scollDidEnd(_ notification : Notification){
}