Fixed the behavior of scrollsToTop that owned by a original window. #28

merged 1 commit into from Oct 11, 2011

4 participants


No description provided.


I'm not sure what this fixes, the text shouldn't get long enough to scroll I wouldn't think?


You can see this behavior in DCIntrospectDemo application.
This application has only one UITableView. I was expected to work it's scroll-to-top gesture. It doesn't work because DCIntrospect inject another UIScrollView to UIWindow.
If apply this patch, demo application's scroll-to-top gesture to work.

Quote from the reference of scrollsToTop:

The scroll-to-top gesture is a tap on the status bar; when this property is YES, the scroll view jumps to the top of the content when this gesture occurs. The default value of this property is YES.
This gesture works on a single visible scroll view; if there are multiple scroll views (for example, a date picker) with this property set, or if the delegate returns NO in scrollViewWillScrollToTop:, UIScrollView ignores the request.


When I changed from UITextField to UITextView in 80425e5 in order to support arrow keys I did not realize that I was adding a UIScrollView so that's probably the right thing do.

The text contains two newlines so yes, it will probably scroll.


+1, scrollsTopTop doesn't work anymore when DCIntrospect is activated. Just wasted more than an hour searching for the solution until I realized DCintrospect is to blame :)


Aha, that makes sense. My bad myell0w, I owe you an hour!

@domesticcatsoftware domesticcatsoftware merged commit 1b18a0f into domesticcatsoftware:master Oct 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment