检测最后可见的nscollectionview项目原型

检测最后可见的nscollectionview项目原型

本文介绍了检测最后可见的nscollectionview项目原型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在NSCollectionView中检测最后一个项目在滚动时是否可见?

How is it possible to detect in NSCollectionView when the last item is visible on scrolling ?

我在寻找一个类似的解决方案,但没有类似的布局方法。

I was looking for a similar solution as this but NSCollectionView doesnt have a similar layout methods.

任何提示?

推荐答案

通过注册 boundsDidChange 文档视图的通知,滚动视图已滚动到

It is possible to get noted when the scroll view has scrolled by registering for boundsDidChange notification of the document view as described here Callbacks When an NSScrollView is Scrolled? .

这样可以检查集合的内容的哪一部分视图显示。

That way one can check which part of the content of the collection view is displayed.

这篇关于检测最后可见的nscollectionview项目原型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 21:12