diff --git a/Libraries/Text/RCTTextManager.m b/Libraries/Text/RCTTextManager.m index 2a7e4d98b4..f817ae4992 100644 --- a/Libraries/Text/RCTTextManager.m +++ b/Libraries/Text/RCTTextManager.m @@ -9,6 +9,7 @@ #import "RCTTextManager.h" +#import "Layout.h" #import "RCTAccessibilityManager.h" #import "RCTAssert.h" #import "RCTConvert.h" @@ -21,7 +22,7 @@ @interface RCTShadowText (Private) -- (NSTextStorage *)buildTextStorageForWidth:(CGFloat)width; +- (NSTextStorage *)buildTextStorageForWidth:(CGFloat)width widthMode:(css_measure_mode_t)widthMode; @end @@ -134,7 +135,7 @@ RCT_EXPORT_SHADOW_PROPERTY(textShadowColor, UIColor) UIEdgeInsets padding = shadowText.paddingAsInsets; CGFloat width = shadowText.frame.size.width - (padding.left + padding.right); - NSTextStorage *textStorage = [shadowText buildTextStorageForWidth:width]; + NSTextStorage *textStorage = [shadowText buildTextStorageForWidth:width widthMode:CSS_MEASURE_MODE_EXACTLY]; [uiBlocks addObject:^(RCTUIManager *uiManager, NSDictionary *viewRegistry) { RCTTextView *textView = viewRegistry[reactTag];