Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there a way to select multiple items through code? #184

Open
gietal opened this issue Jan 10, 2017 · 3 comments
Open

is there a way to select multiple items through code? #184

gietal opened this issue Jan 10, 2017 · 3 comments

Comments

@gietal
Copy link
Contributor

gietal commented Jan 10, 2017

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

@jwilling
Copy link
Owner

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?

@gietal
Copy link
Contributor Author

gietal commented Jan 11, 2017

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

@jwilling
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants