I have a horizontal CollectionViewCell
with a UISlider
inside of it. When I try to drag the slider the cell swipes.
How can I prevent the cell from swiping when I drag the slider? I don't want to lose the ability to swipe the cell itself meaning when I swipe the cell it should move to the next cell which the slider has nothing to do with.
class MyCell: UICollectionViewCell {
lazy var slider: UISlider = {
let slider = UISlider()
slider.translatesAutoresizingMaskIntoConstraints = false
// ...
return slider
}()
// slider is pinned towards the bottom of the cell
}