Debugging uiscrollview not responding to user

  • I've got a UIScrollView that's supposed to page horizontally. It works correctly if programmatically scrolled, but user touches to scroll it are getting eaten by something else.

    Is there any way to debug the touches, and see who's getting them? This used to work, but I've been doing some other work and hadn't noticed that this broke. I've got 45 minutes left to fix this, and I don't know what to look for.

    Thanks,
    Rick
  • On 5/23/12 3:24 PM, Rick Mann wrote:
    > I've got a UIScrollView that's supposed to page horizontally. It
    > works correctly if programmatically scrolled, but user touches to
    > scroll it are getting eaten by something else.
    >
    > Is there any way to debug the touches, and see who's getting them?
    > This used to work, but I've been doing some other work and hadn't
    > noticed that this broke. I've got 45 minutes left to fix this, and I
    > don't know what to look for.

    Well, first check that you didn't accidentally setUserInteractionEnabled:NO.

    You could try breaking on, e.g., touchesBegan:withEvent: and see who's
    eating the touches, if that's the problem.

    Though with such little time left (ah, deadlines), I'd probably just do
    a binary search through all the old commits of the code until I found
    the commit that broke it, then do a diff.  Not particularly elegant, but
    often quite fast for tracking these sorts of bugs down.  (Both hg and
    git have a "bisect" feature designed to facilitate this.)

    --
    Conrad Shultz

    Synthetiq Solutions
    www.synthetiqsolutions.com
  • On May 23, 2012, at 15:51 , Conrad Shultz wrote:

    > On 5/23/12 3:24 PM, Rick Mann wrote:
    >> I've got a UIScrollView that's supposed to page horizontally. It
    >> works correctly if programmatically scrolled, but user touches to
    >> scroll it are getting eaten by something else.
    >>
    >> Is there any way to debug the touches, and see who's getting them?
    >> This used to work, but I've been doing some other work and hadn't
    >> noticed that this broke. I've got 45 minutes left to fix this, and I
    >> don't know what to look for.
    >
    > Well, first check that you didn't accidentally setUserInteractionEnabled:NO.
    >
    > You could try breaking on, e.g., touchesBegan:withEvent: and see who's
    > eating the touches, if that's the problem.
    >
    > Though with such little time left (ah, deadlines), I'd probably just do
    > a binary search through all the old commits of the code until I found
    > the commit that broke it, then do a diff.  Not particularly elegant, but
    > often quite fast for tracking these sorts of bugs down.  (Both hg and
    > git have a "bisect" feature designed to facilitate this.)

    Yeah, I didn't want to have to do that. :-)

    Fortunately, I found it. I tried disabling gesture recognizers (they're so greedy) until the normal scrolling worked, but that didn't do it. So I deleted the GRs until it started working. It was a tap GR, which I replaced with a button.

    Thanks, though!

    --
    Rick
previous month may 2012 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today