Как определить, прокрутил ли пользователь до конца NSTableView

У меня есть NSTableView, и я хотел бы знать, когда пользователь прокрутил страницу вниз, чтобы я мог выполнить действие. Не знаете, как это сделать?

ОБНОВЛЕНИЕ: Вот как я вычисляю нижнюю часть таблицы:

-(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!");
    }
}
6
задан WrightsCS 14 February 2011 в 16:52
поделиться