Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Alert on top of scroll view doesn't hide until tracking actions complete #7

Closed
tposch opened this Issue · 3 comments

3 participants

Tyler Poschel Radu Dutzan Russ Shanahan
Tyler Poschel

I have a UIWebView in my application and I am subscribing to the UIScrollView events being generated by the webView.scrollView property. I am using the OLGhostAlertView to display notifications to the user while they are scrolling through the page. I noticed that if I display a notification while I am dragging my finger and I continue to drag my finger, then the hide() method wasn't being called until after I released my finger (long after the timeout had expired).

I resolved the issue by changing this line of code:

    [self performSelector:@selector(hide) withObject:nil afterDelay:self.timeout];

to this:

    [self performSelector:@selector(hide) withObject:nil afterDelay:self.timeout inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]];

I do not know all the side effects of that change but it might be worth introducing to your control. I appreciate you posting this control for all to use!

Radu Dutzan
Owner

Thanks a lot for sharing this. Sadly, I don't know the potential consequences of that change either, so I'd rather refrain from adding this to the code. I will make a reference to this issue on a future revision of the README for people who might encounter the same problem.

Russ Shanahan
roostr commented

Hi, I came here to submit this pull request, but I see it's already solved.

This technique seems to be the Apple-endorsed fix. See WWDC 2012 video "Enhancing User Experience with Scroll Views" starting at minute 35.

Radu Dutzan radutzan closed this issue from a commit
Radu Dutzan Fix #7. 0229bce
Radu Dutzan radutzan closed this in 0229bce
Radu Dutzan
Owner

Thanks a lot for your input, people. Sorry this took so long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.