TomThorpe / TTRangeSlider

A slider, similar in style to UISlider, but which allows you to pick a minimum and maximum range.
MIT License
968 stars 204 forks source link

Data reset after scroll #90

Closed MuhammadEhsanMirzaei closed 5 years ago

MuhammadEhsanMirzaei commented 5 years ago

Hi, thank you for your slider, I added your slider to a dynamic table view cell it's work fine until I scroll down and return up, it's reset all data that user select on slider to default value

TomThorpe commented 5 years ago

Hi,

This will be because table view cells are reused and don't persist past the edge of the screen (when they scroll off screen they will be removed from the tableview, and when they return back to screen the cell is re-added based on the call from the datasource to get a tableview cell for index x). When you return the cell in your table view datasource you will need to set the values on the slider again.