JNWCollectionView icon indicating copy to clipboard operation
JNWCollectionView copied to clipboard

is there a way to select multiple items through code?

Open gietal opened this issue 8 years ago • 3 comments

found this on JNWCollectionViewFramework.m: (void)selectItemsAtIndexPaths:(NSArray *)indexPaths animated:(BOOL)animated

but it seems like this function is private, what's the reason for this? it seems like a useful code

gietal avatar Jan 10 '17 19:01 gietal

I believe this wasn't exposed because it was very simple to reproduce outside of the framework by looping over selected indexes. Do you think it's valuable enough to be public?

jwilling avatar Jan 11 '17 01:01 jwilling

the only public selection function I see is (void)selectItemAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(JNWCollectionViewScrollPosition)scrollPosition animated:(BOOL)animated

which defaults to single selection and will deselect my previously selected items

I would at least need this function to be public, if I want to loop through my indexes and select them one by one: (void)selectItemAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated

gietal avatar Jan 11 '17 18:01 gietal

You're right, I apologize. It's been a very long time since I've looked at this code. If you want to make a pull request to make this public that'd be great!

jwilling avatar Jan 12 '17 19:01 jwilling