Formsheets in iOS13 introduced the ability to drag the sheet down to dismiss it. This causes a problem with the GradientSlider where you can't drag the slider very far - it stutters and you'll see a call to cancelTracking invoked for seemingly no reason. If the GradientSlider is displayed in a popover; it works fine.
To fix the issue, you need to add code into the GradientSlider to ignore a UIPanGestureRecognizer:
override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
if gestureRecognizer is UIPanGestureRecognizer {
return false
}
return true
}
You might also want to check isTracking == true but I found it didn't matter.
Formsheets in iOS13 introduced the ability to drag the sheet down to dismiss it. This causes a problem with the GradientSlider where you can't drag the slider very far - it stutters and you'll see a call to cancelTracking invoked for seemingly no reason. If the GradientSlider is displayed in a popover; it works fine.
To fix the issue, you need to add code into the GradientSlider to ignore a UIPanGestureRecognizer:
You might also want to check
isTracking == true
but I found it didn't matter.