Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Merged
merged 1 commit into from

4 participants

@atty303

No description provided.

@domesticcatsoftware

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

@atty303

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.

@0xced

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.

@myell0w

+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 :)

@domesticcatsoftware

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

@domesticcatsoftware domesticcatsoftware merged commit 1b18a0f into domesticcatsoftware:master
@myell0w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  DCIntrospect/DCIntrospect.m
View
1  DCIntrospect/DCIntrospect.m
@@ -148,6 +148,7 @@ - (void)start
self.inputTextView.autocorrectionType = UITextAutocorrectionTypeNo;
self.inputTextView.autocapitalizationType = UITextAutocapitalizationTypeNone;
self.inputTextView.inputView = [[[UIView alloc] init] autorelease];
+ self.inputTextView.scrollsToTop = NO;
[mainWindow addSubview:self.inputTextView];
}
Something went wrong with that request. Please try again.