How to determine if a user has scrolled to the end of an NSTableView
-
12-11-2019 - |
Question
I have an NSTableView, and I would like to know when the user has scrolled to the bottom, so I can perform an action. Not quite sure how to go about this?
UPDATE: Here is how I am calculating the bottom of the table:
-(void)tableViewDidScroll:(CPNotification) notification
{
var scrollView = [notification object];
var currentPosition = CGRectGetMaxY([scrollView visibleRect]);
var tableViewHeight = [messagesTableView bounds].size.height - 100;
//console.log("TableView Height: " + tableViewHeight);
//console.log("Current Position: " + currentPosition);
if (currentPosition > tableViewHeight - 100)
{
console.log("we're at the bottom!");
}
}
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow