WorldDownTown / RangeSeekSlider

RangeSeedSlider provides a customizable range slider like a UISlider.
MIT License
755 stars 282 forks source link

Slider does not work with iOS 13 in a collection view #81

Open ledian101 opened 5 years ago

ledian101 commented 5 years ago

New Issue Checklist

Issue Description

I am using the RangeSeekSlider in a project that uses iOS 12. The slider is embedded in a not expandable collection view cell. When updated to iOS 13 beta, the slider does not respond anymore. I tested it also with other iOS versions and it works as always.

Environment

iOS version: iOS 13 beta 6

dimitrow commented 5 years ago

is there any solution? I got the same problem

Oowomn commented 5 years ago

I'm facing same problem as well. In my case, my slider is embedded in a collection view cell. It cannot drag the handles smoothly. I found that, in iOS 13, the modally presentation is embed with a gesture automatically for pulling down to dismiss the view. I think this gesture is conflict with the collection view scrolling which stop the drag action of handles of the slider. My workaround is set the presentation from "Same As Destination" to "Full Screen".

image
tejasdhanuka commented 5 years ago

The same issue happened in my project as well. I am using this SDK in SwiftUI and rendering it on a sheet presentation. The handles are not dragging smoothly and causing the sheet to move up or down. I think the touch events are being registered by the sheet to move it up/down to dismiss it, the SDK needs to handle the touches on sheet properly. Any solution available with anyone?

sanvean commented 4 years ago

Found this answer on Stackoverflow https://stackoverflow.com/questions/58001780/swipe-gesture-interrupts-uislider-control-in-ios-13-but-not-previous-ios-versio so if it works for you give the OP on StackOverflow some credit!

If you add a panGesture to a RangeSlider as follows, the cancelTouchesInView = false should allow RangeSlider to operate normally.

let panGesture = UIPanGestureRecognizer(target: nil, action:nil) panGesture.cancelsTouchesInView = false slider.addGestureRecognizer(panGesture)

santoshn547 commented 4 years ago

The solution given by @sanvean worked ! Thanks

rollin-s commented 4 years ago

I also confirm that the solution by @sanvean worked !

It also work in every views that include scrolling. I had the issue in a scroll view, and this helped a lot !

SteveBlackUK commented 4 years ago

+1 for @sanvean's suggestion!

philosopherdog commented 3 years ago

Good one @sanvean !

saqibaliempg commented 3 years ago

The solution given by @sanvean worked ! Thanks

arwenGhafoor commented 2 years ago

Found this answer on Stackoverflow https://stackoverflow.com/questions/58001780/swipe-gesture-interrupts-uislider-control-in-ios-13-but-not-previous-ios-versio so if it works for you give the OP on StackOverflow some credit!

If you add a panGesture to a RangeSlider as follows, the cancelTouchesInView = false should allow RangeSlider to operate normally.

let panGesture = UIPanGestureRecognizer(target: nil, action:nil) panGesture.cancelsTouchesInView = false slider.addGestureRecognizer(panGesture)

thanks worked forme