mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
editable
property was implemented for RCTUITextField
Summary: `UITextField` surprisingly does not have `editable` property (only UITextView does), so we have to implement it ourselfs. Reviewed By: javache Differential Revision: D5153070 fbshipit-source-id: 5a76c623fc5c7c3eec10c600c942cf82c93833cd
This commit is contained in:
parent
f954f3d9b6
commit
719f0005f6
@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, assign, readonly) BOOL textWasPasted;
|
||||
@property (nonatomic, strong, nullable) UIColor *placeholderColor;
|
||||
@property (nonatomic, assign) UIEdgeInsets textContainerInset;
|
||||
@property (nonatomic, assign, getter=isEditable) BOOL editable;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -71,6 +71,16 @@
|
||||
attributes:attributes];
|
||||
}
|
||||
|
||||
- (BOOL)isEditable
|
||||
{
|
||||
return self.userInteractionEnabled;
|
||||
}
|
||||
|
||||
- (void)setEditable:(BOOL)editable
|
||||
{
|
||||
self.userInteractionEnabled = editable;
|
||||
}
|
||||
|
||||
#pragma mark - Caret Manipulation
|
||||
|
||||
- (CGRect)caretRectForPosition:(UITextPosition *)position
|
||||
|
Loading…
x
Reference in New Issue
Block a user