RCTUITextView.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <UIKit/UIKit.h>
  8. #import <React/RCTBackedTextInputViewProtocol.h>
  9. #import <React/RCTBackedTextInputDelegate.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. /*
  12. * Just regular UITextView... but much better!
  13. */
  14. @interface RCTUITextView : UITextView <RCTBackedTextInputViewProtocol>
  15. - (instancetype)initWithFrame:(CGRect)frame textContainer:(nullable NSTextContainer *)textContainer NS_UNAVAILABLE;
  16. - (instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
  17. @property (nonatomic, weak) id<RCTBackedTextInputDelegate> textInputDelegate;
  18. @property (nonatomic, assign) BOOL contextMenuHidden;
  19. @property (nonatomic, assign, readonly) BOOL textWasPasted;
  20. @property (nonatomic, copy, nullable) NSString *placeholder;
  21. @property (nonatomic, strong, nullable) UIColor *placeholderColor;
  22. @property (nonatomic, assign) CGFloat preferredMaxLayoutWidth;
  23. // The `clearButtonMode` property actually is not supported yet;
  24. // it's declared here only to conform to the interface.
  25. @property (nonatomic, assign) UITextFieldViewMode clearButtonMode;
  26. // The `caretHidden` property actually is not supported yet;
  27. // it's declared here only to conform to the interface.
  28. @property (nonatomic, assign) BOOL caretHidden;
  29. @end
  30. NS_ASSUME_NONNULL_END