Ios 在React Native中使用ScrollStop的Mutliline TextInput

Ios 在React Native中使用ScrollStop的Mutliline TextInput,ios,react-native,Ios,React Native,我想在用户点击iOS上的状态栏时,对多行文本输入进行“滚动到顶部”操作。TextInput在屏幕上有一个最大刻度,因此上下文相当直接 但是,RCTMultilineTextInputView将backedtedOutputView作为子视图,并且道具不会传递到子视图。(如否) 我有办法通过这个道具吗?或者,对于这种情况有更好的实现吗?我通过category添加了一个额外的属性scrollsToTop // RCTMultilineTextInputView+ScrollsToTopAddit

我想在用户点击iOS上的状态栏时,对多行文本输入进行“滚动到顶部”操作。TextInput在屏幕上有一个最大刻度,因此上下文相当直接


但是,
RCTMultilineTextInputView
backedtedOutputView
作为子视图,并且道具不会传递到子视图。(如


我有办法通过这个道具吗?或者,对于这种情况有更好的实现吗?

我通过category添加了一个额外的属性
scrollsToTop

// RCTMultilineTextInputView+ScrollsToTopAdditions.h

#import "RCTText/RCTMultilineTextInputViewManager.h"
#import <React/RCTViewManager.h>

NS_ASSUME_NONNULL_BEGIN

@interface RCTMultilineTextInputViewManager (ScrollsToTopAdditions)

@end

NS_ASSUME_NONNULL_END
// RCTMultilineTextInputViewManager+ScrollsToTopAdditions.m

#import "RCTMultilineTextInputViewManager+ScrollsToTopAdditions.h"

@implementation RCTMultilineTextInputViewManager (ScrollsToTopAdditions)
#if !TARGET_OS_TV
  RCT_REMAP_VIEW_PROPERTY(scrollsToTop, backedTextInputView.scrollsToTop, BOOL)
#endif
@end