Tengo un NSTableView, y me gustaría saber cuándo se ha desplazado hacia abajo para poder realizar una acción. ¿No estoy seguro de cómo hacerlo?Cómo determinar si un usuario se desplazó hasta el final de un NSTableView
ACTUALIZACIÓN: Así es como estoy calculando la parte inferior de la tabla:
-(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!");
}
}
puedo mostrar un fragmento? –
He actualizado la publicación. –
Esto funciona bien, ¿me pueden ayudar un poco al calcular si los píxeles inferiores son visibles? –