diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index b26dd36..180fbd9 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -2449,7 +2449,7 @@ PODS: - React-perflogger (= 0.83.0) - React-utils (= 0.83.0) - SocketRocket - - ReactNativeTypeRich (2.2.0): + - ReactNativeTypeRich (2.2.1): - boost - DoubleConversion - fast_float @@ -2802,7 +2802,7 @@ SPEC CHECKSUMS: ReactAppDependencyProvider: ebcf3a78dc1bcdf054c9e8d309244bade6b31568 ReactCodegen: 11c08ff43a62009d48c71de000352e4515918801 ReactCommon: 424cc34cf5055d69a3dcf02f3436481afb8b0f6f - ReactNativeTypeRich: 6574bc6206275e1afce4d8defa6d1bde7443e738 + ReactNativeTypeRich: 86e81019b5200d62bc5995ab15d75ebaef081779 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 Yoga: 6ca93c8c13f56baeec55eb608577619b17a4d64e diff --git a/example/src/App.tsx b/example/src/App.tsx index d47bf10..b2d5659 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -470,8 +470,9 @@ const styles = StyleSheet.create({ backgroundColor: 'gainsboro', // fontSize: 34, fontFamily: 'Nunito-Regular', - // paddingVertical: 12, - // paddingHorizontal: 14, + paddingVertical: 12, + paddingHorizontal: 14, + borderWidth: 2, }, scrollPlaceholder: { marginTop: 24, diff --git a/ios/TypeRichTextInputView.mm b/ios/TypeRichTextInputView.mm index 5e7eb43..ad13422 100644 --- a/ios/TypeRichTextInputView.mm +++ b/ios/TypeRichTextInputView.mm @@ -130,7 +130,7 @@ - (instancetype)initWithFrame:(CGRect)frame { _disableImagePasting = NO; // Add textView as subview (not contentView) - [self addSubview:_textView]; + self.contentView = _textView; [self updatePlaceholderVisibility]; } @@ -753,19 +753,6 @@ - (void)updatePlaceholderVisibility { _placeholderLabel.hidden = _textView.text.length > 0; } -- (void)layoutSubviews { - [super layoutSubviews]; - - // Ensure text view fills the parent bounds - _textView.frame = self.bounds; - - // Debug: Log frame and content size - NSLog(@"TextView frame: %@, contentSize: %@, maxLines: %ld", - NSStringFromCGRect(_textView.frame), - NSStringFromCGSize(_textView.contentSize), - (long)_textView.textContainer.maximumNumberOfLines); -} - #pragma mark - Event emitter - (std::shared_ptr)getEventEmitter {