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

Expose current cell in a method #37

Open
danqing opened this issue Jan 18, 2020 · 1 comment
Open

Expose current cell in a method #37

danqing opened this issue Jan 18, 2020 · 1 comment

Comments

@danqing
Copy link

danqing commented Jan 18, 2020

I'm subclassing DTPhotoViewController to add support for video, and I noticed that there's no method that exposes the currently visible collection view cell.

This is problematic for me because I need to access the cell in order to configure the AVPlayer instance I added to it. I can't do it in configureCell method because it's possible for a user to scroll a bit and then give up (thus returning to the previous cell), but other methods don't pass in the cell instance.

I suppose I can cast scrollView to UICollectionView and use that, but that's not future-proof. Can we have a way to access the current cell?

Thank you!

@tungvoduc
Copy link
Owner

Let's see if I can do anything about it this weekend. Also, you are welcome to open a PR :)

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