mirror of
https://github.com/Tencent/Hippy.git
synced 2026-10-29 14:10:47 +08:00
fix(ios): add caretColor property support
This commit is contained in:
committed by
hippy-actions[bot]
parent
00f54e85ba
commit
46b4e776e6
@@ -48,6 +48,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (UIColor*)caretColor{
|
||||
return self.tintColor;
|
||||
}
|
||||
|
||||
- (void)setCaretColor:(UIColor*)color{
|
||||
self.tintColor = color;
|
||||
}
|
||||
|
||||
- (void)setReturnKeyType:(UIReturnKeyType) returnKeyType{
|
||||
[super setReturnKeyType:returnKeyType];
|
||||
if([self isFirstResponder]){
|
||||
|
||||
@@ -55,6 +55,21 @@
|
||||
return [super resignFirstResponder];
|
||||
}
|
||||
|
||||
- (void)setKeyboardType:(UIKeyboardType)keyboardType {
|
||||
[super setKeyboardType:keyboardType];
|
||||
|
||||
if([self isFirstResponder]){
|
||||
[self reloadInputViews];
|
||||
}
|
||||
}
|
||||
|
||||
- (UIColor*)caretColor{
|
||||
return self.tintColor;
|
||||
}
|
||||
|
||||
- (void)setCaretColor:(UIColor*)color{
|
||||
self.tintColor = color;
|
||||
}
|
||||
@end
|
||||
|
||||
@interface NativeRenderTextView () <NativeRenderUITextViewResponseDelegate>
|
||||
|
||||
@@ -170,6 +170,7 @@ HIPPY_REMAP_VIEW_PROPERTY(selectionColor, tintColor, UIColor)
|
||||
HIPPY_EXPORT_VIEW_PROPERTY(selectTextOnFocus, BOOL)
|
||||
HIPPY_EXPORT_VIEW_PROPERTY(selection, NativeRenderTextSelection)
|
||||
HIPPY_EXPORT_VIEW_PROPERTY(text, NSString)
|
||||
HIPPY_REMAP_VIEW_PROPERTY(caretColor, textView.caretColor, UIColor)
|
||||
|
||||
HIPPY_CUSTOM_SHADOW_PROPERTY(fontSize, NSNumber, NativeRenderObjectTextView) {
|
||||
view.font = [HippyFont updateFont:view.font withSize:json];
|
||||
|
||||
Reference in New Issue
Block a user