NSTableView가 있는데 사용자가 아래로 스크롤 한 것을 알고 싶습니다. 그러면 작업을 수행 할 수 있습니다. 이 문제를 어떻게 해결할 지 잘 모르십니까? UPDATE사용자가 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!");
}
}
당신이 조각을 보여줄 수 : 항상 같은 값은 내가 NSClipView 경계를 사용하는 것이 더 발견했습니다? –
게시물을 업데이트했습니다. –
잘 작동합니다. 하단 픽셀을 볼 수 있는지 계산하는 데 약간의 도움을받을 수 있습니까? –