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 cellForItem API #71

Open
kishancm opened this issue Jul 30, 2020 · 4 comments
Open

Expose cellForItem API #71

kishancm opened this issue Jul 30, 2020 · 4 comments

Comments

@kishancm
Copy link

Currently I am using this repo for show and play video player in Cell and video is automatically play.
But problem is that when I am going to another tab video is still player on ExampleCell.I want to stop video player so how can I access cell outside CardForItemAt method and handle my issue ?

Thanks

@veersr9
Copy link

veersr9 commented Aug 5, 2020

@kishancm have you get any solution for this. I am so stuck with this . ?

@kishancm kishancm closed this as completed Aug 6, 2020
@kishancm
Copy link
Author

kishancm commented Aug 6, 2020

@kishancm have you get any solution for this. I am so stuck with this . ?

@kishancm kishancm reopened this Aug 6, 2020
@kishancm
Copy link
Author

kishancm commented Aug 6, 2020

@veersr9 Have you find any solution for stop video player in background ??

@JoniVR
Copy link
Owner

JoniVR commented Aug 6, 2020

Hi, there is no direct API access for this provided yet but you can just use:

if let focussedCardIndex = cardSwiper.focussedCardIndex {
        let card = cardSwiper.verticalCardSwiperView.cellForItem(at: IndexPath(row: focussedCardIndex, section: 0))
        // Do something with the card
}

because VerticalCardSwiper is built on top of UICollectionView. I'll expose this as an API call in a future version.

@JoniVR JoniVR changed the title How can I access ExampleCell outside of cardForItemAt method. Expose cellForItem API Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants