indragiek / InAppViewDebugger

A UIView debugger (like Reveal or Xcode) that can be embedded in an app for on-device view debugging

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix for iOS 13 modal presentation style interfering with the `RangeSlider`

NSExceptional opened this issue · comments

I'm too lazy to make a PR for such a simple change, but if you add this to RangeSlider it will fix the issue. Basically, modal sheets are presented with a new style now instead of fullscreen, and this new style allows you to drag anywhere on the sheet to dismiss the sheet. Custom controls need to abort this gesture or the control will not always receive touches.

override func gestureRecognizerShouldBegin(_ gesture: UIGestureRecognizer) -> Bool {
    return false
}

To see this bug in action, run the demo app on iOS 13 in the simulator. Try to drag the UISlider, then your RangeSlider. It is harder to drag the RangeSlider. Now, apply the fix and try again.