From 37f6d927c18d33554666b5d452e25a22ef1187a1 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Mon, 11 Feb 2019 00:13:43 +0800 Subject: [PATCH] [iOS] Prevent crash when scrollEnabled used in singleline textinput --- Libraries/Text/TextInput/Singleline/RCTUITextField.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Libraries/Text/TextInput/Singleline/RCTUITextField.m b/Libraries/Text/TextInput/Singleline/RCTUITextField.m index 411e2872b667a5..6549f203cbca03 100644 --- a/Libraries/Text/TextInput/Singleline/RCTUITextField.m +++ b/Libraries/Text/TextInput/Singleline/RCTUITextField.m @@ -87,6 +87,16 @@ - (void)setEditable:(BOOL)editable self.enabled = editable; } +- (void)setScrollEnabled:(BOOL)enabled +{ + // Do noting, compatible with multiline textinput +} + +- (BOOL)scrollEnabled +{ + return NO; +} + #pragma mark - Context Menu - (BOOL)canPerformAction:(SEL)action withSender:(id)sender