Swipe gesture interrupts UISlider control in iOS 13, but not previous iOS versions

前端 未结 4 1117
感情败类
感情败类 2021-01-19 05:37

Note: This is the iOS 13 beta, but also could apply to the official release tomorrow.

Update 2: I replaced it with a larger thumb

4条回答
  •  一个人的身影
    2021-01-19 06:32

    I had the same issue and managed to resolve it by doing the following:

    Add a panGesture ,that does nothing, to your sliders and set their cancelsTouchesInView propery to false.

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

    Now your sliders should slide like a knife cutting a butter with no swipe interruption.

提交回复
热议问题