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境界を使用する方が良いことがわかりましたか? –
投稿を更新しました。 –
これはうまくいきます。下のピクセルが表示されているかどうか計算する際に少し助けてくれますか? –