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];
[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!
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.
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.
Thanks a lot for your input, people. Sorry this took so long.