12

A new behavior in iOS 5.1 related to UISplitViewController apps seems to be intercepting UISlider motion with undesired results. This might also apply to UISegmented Controls and any other control surface that handles left-to-right gestures.

With a UISplitView in Portrait orientation, the Master view is normally hidden. Starting in iOS 5.1 a right swipe on screen brings up the Master View on the left side of the device. The problem is, sliding the thumb of my UISlider control is misinterpreted as a screen swipe: if I give the UISlider thumb a sharp push to the right, the Master panel pops up.

In my app, there are undesired side-effects (and performance issues) with brining up the Master view.

I consider this behavior an Apple bug. Any ideas how to work around it? Can I somehow have the UISlider capture the gesture and process it, without passing it up the responder chain?

Thanks in advance for any insight!

Yashesh
  • 1,799
  • 1
  • 11
  • 29
jbbenni
  • 1,158
  • 12
  • 31
  • 11
    thanks to @Dimitris Tavlikos. While I still believe Apple introduced a bug with this (UIControls such as UISlider shouldn't compete with UISplitViewController over this gesture), there is an easy workaround: `splitViewController.presentsWithGesture = NO; // SplitView won't recognize right swipe` What is it about posting a question that causes you to suddenly find the answer elsewhere? – jbbenni Mar 13 '12 at 20:46
  • 1
    What if I want to preserve default gesture functionality on the master but only disable it when the slider is moving? Setting `presentsWithGesture` to `no` disables the gesture everywhere. – Mark13426 Nov 25 '16 at 00:39
  • Not gonna happen. The slider doesn't move because the gesture is intercepted before the slider starts moving. You can't only disable the hijack while the slider is moving, because the slider doesn't even start to move. It's a long shot, but there may be a way to intercept the gesture before processing, then determine if it would have started the slider moving, and disable the hijack in that case. But that's tricky. The hierarchy of event processing is working against you, since the OS gets first crack at the gesture. – jbbenni Dec 04 '16 at 04:24

1 Answers1

9

Apple confirmed the issue as a duplicate of a previously reported bug that is currently under investigation (Bug ID# 10170209).

The workaround seems to be functioning fine for now.

jbbenni
  • 1,158
  • 12
  • 31