作者:yeyeye | 来源:互联网 | 2023-09-04 17:13
IprogrammaticallyselectaiteminmyNSCollectionView.Theitemisselectedasexpectedbutthevi
I programmatically select a item in my NSCollectionView. The item is selected as expected but the view doesn't scroll automatically to this item.
我以编程方式在NSCollectionView中选择一个项。项目按预期选择,但视图不会自动滚动到该项目。
[collectionView setSelectionIndexes:[NSIndexSet indexSetWithIndex:compt]];
How to scroll to the selected item ?
如何滚动到选定的项目?
3 个解决方案