nicklockwood / iCarousel

A simple, highly customisable, data-driven 3D carousel for iOS and Mac OS
http://www.charcoaldesign.co.uk/source/cocoa#icarousel
Other
11.99k stars 2.58k forks source link

Carousel inside reusable UITableViewCell, carousel views shuffled #898

Open rajdhakate opened 3 years ago

rajdhakate commented 3 years ago

Hi,

I'm using iCarousel inside reusable UITableViewCell. When I change current item of carousel inside one UITableView cell, and scroll down the tableview, upcoming carousel's current item index is already changed to previous carousel's index.

I've tried the UITableViewCell's prepareForReuse method,

override func prepareForReuse() { super.prepareForReuse() postViewHeightConstraint.constant = 0 carousel.invalidateIntrinsicContentSize() }

setting datasource and delegate nil in prepareForReuse renders empty carousel.