mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
Set scrollsToTop = NO for UITextViews
Summary: Complete the work from 853d5b2221 by also fixing the placeholder view.
Closes https://github.com/facebook/react-native/pull/3129
Reviewed By: @svcscm
Differential Revision: D2499753
Pulled By: @vjeux
This commit is contained in:
committed by
facebook-github-bot-0
parent
c5b82fe600
commit
1d77645a53
@@ -78,6 +78,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
|
||||
_placeholderView = [[UITextView alloc] initWithFrame:self.bounds];
|
||||
_placeholderView.backgroundColor = [UIColor clearColor];
|
||||
_placeholderView.scrollEnabled = false;
|
||||
_placeholderView.scrollsToTop = NO;
|
||||
_placeholderView.attributedText =
|
||||
[[NSAttributedString alloc] initWithString:_placeholder attributes:@{
|
||||
NSFontAttributeName : (_textView.font ? _textView.font : [self defaultPlaceholderFont]),
|
||||
|
||||
Reference in New Issue
Block a user