mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-06 17:52:57 +08:00
Summary: We lose the support of `onScroll` prop for multiline TextInput, let's add it again. [iOS] [Fixed] - Fixed onScroll prop in mulitline TextInput Pull Request resolved: https://github.com/facebook/react-native/pull/23668 Differential Revision: D14253996 Pulled By: cpojer fbshipit-source-id: 43ed191e18fdb716f6c53be3bf0f59f917b34b59
37 lines
1.2 KiB
Objective-C
37 lines
1.2 KiB
Objective-C
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
@protocol RCTBackedTextInputViewProtocol;
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@protocol RCTBackedTextInputDelegate <NSObject>
|
|
|
|
- (BOOL)textInputShouldBeginEditing; // Return `NO` to disallow editing.
|
|
- (void)textInputDidBeginEditing;
|
|
|
|
- (BOOL)textInputShouldEndEditing; // Return `YES` to allow editing to stop and to resign first responder status. `NO` to disallow the editing session to end.
|
|
- (void)textInputDidEndEditing; // May be called if forced even if `textInputShouldEndEditing` returns `NO` (e.g. view removed from window) or `[textInput endEditing:YES]` called.
|
|
|
|
- (BOOL)textInputShouldReturn; // May be called right before `textInputShouldEndEditing` if "Return" button was pressed.
|
|
- (void)textInputDidReturn;
|
|
|
|
- (BOOL)textInputShouldChangeTextInRange:(NSRange)range replacementText:(NSString *)string; // Return NO to not change text.
|
|
- (void)textInputDidChange;
|
|
|
|
- (void)textInputDidChangeSelection;
|
|
|
|
@optional
|
|
|
|
- (void)scrollViewDidScroll:(UIScrollView *)scrollView;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|