adevinta / spark-ios

✨ Simple, Modular & Accessible UI Components for your iOS Applications
MIT License
20 stars 4 forks source link

[Bug] Slider: Investigate issue when slider is in a vertical scroll view #888

Closed LouisBorleeAdevinta closed 7 months ago

LouisBorleeAdevinta commented 7 months ago

https://adevinta.slack.com/archives/C04QCSQGQUX/p1712671798336269

LouisBorleeAdevinta commented 7 months ago

For all UIControls using beginTracking / endTracking, we have to add this to prevent cancelTracking from being called on vertical swipes

        // Fix conflict with vertical swipes (scrollViews, bottomSheets...)
        let panGesture = UIPanGestureRecognizer(target: nil, action: nil)
        panGesture.cancelsTouchesInView = false
        self.addGestureRecognizer(panGesture)