[TextInput] Set scrollsToTop = NO for UITextViews

Summary:
Now that UITextViews have a delegate, they consume the "tap to scroll to top" gesture. This diff restores the original behavior of letting the top-level scroll view (if any) scroll to top instead.

I tried exposing scrollsToTop as a prop and was semi-successful in that I could turn scroll-to-top on and off for the top-level scroll view scroll, but the text view itself would never scroll to top. So instead of exposing it as a prop, this diff sets scrollsToTop always to NO, which is how TextInput behaved previously.

Closes https://github.com/facebook/react-native/pull/2333
Github Author: James Ide <ide@jameside.com>
This commit is contained in:
James Ide 2015-09-01 03:23:29 -07:00
Родитель 2b3a4bd27d
Коммит 853d5b2221
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -35,6 +35,7 @@
_textView = [[UITextView alloc] initWithFrame:self.bounds];
_textView.backgroundColor = [UIColor clearColor];
_textView.scrollsToTop = NO;
_textView.delegate = self;
[self addSubview:_textView];
}