1
1
#import < React/RCTConvert.h>
2
- #import < Text/RCTShadowRawText .h>
3
- #import < Text/RCTShadowText .h>
2
+ #import < Text/RCTRawTextShadowView .h>
3
+ #import < Text/Text/RCTTextShadowView .h>
4
4
#import " RNTextGradient.h"
5
5
#import " RNGradientValue.h"
6
6
#import " RNShadowTextGradient.h"
7
7
8
- @interface RCTShadowText ()
8
+ @interface RCTTextShadowView ()
9
9
10
10
- (UIEdgeInsets)paddingAsInsets ;
11
11
@@ -102,9 +102,9 @@ - (void)setUseViewFrame:(BOOL)useViewFrame
102
102
NSMutableArray <RNGradientValue *> *colors = [NSMutableArray new ];
103
103
104
104
int (^__block iter)(RCTShadowView *, int ) = ^(RCTShadowView *view, int textIndex) {
105
- if ([view isKindOfClass: [RCTShadowRawText class ]]) {
105
+ if ([view isKindOfClass: [RCTRawTextShadowView class ]]) {
106
106
BOOL parentIsGradient = [view.superview isKindOfClass: [RNShadowTextGradient class ]];
107
- NSString *text = ((RCTShadowRawText *)view).text ;
107
+ NSString *text = ((RCTRawTextShadowView *)view).text ;
108
108
109
109
if (parentIsGradient) {
110
110
RNGradientBlock colorForFrame = ^(CGRect textFrame) {
@@ -118,7 +118,7 @@ - (void)setUseViewFrame:(BOOL)useViewFrame
118
118
119
119
return (int )(textIndex + text.length );
120
120
121
- } else if ([view isKindOfClass: [RCTShadowText class ]]) {
121
+ } else if ([view isKindOfClass: [RCTTextShadowView class ]]) {
122
122
int nextTextIndex = textIndex;
123
123
124
124
if ([view isKindOfClass: [RNShadowTextGradient class ]]) {
@@ -179,16 +179,16 @@ - (void)setUseViewFrame:(BOOL)useViewFrame
179
179
}
180
180
}
181
181
182
- + (int )textLength : (RCTShadowText *)view
182
+ + (int )textLength : (RCTTextShadowView *)view
183
183
{
184
184
int length = 0 ;
185
185
186
186
for (RCTShadowView *subview in view.reactSubviews ) {
187
- if ([subview isKindOfClass: [RCTShadowRawText class ]]) {
188
- length += ((RCTShadowRawText *)subview).text .length ;
187
+ if ([subview isKindOfClass: [RCTRawTextShadowView class ]]) {
188
+ length += ((RCTRawTextShadowView *)subview).text .length ;
189
189
190
- } else if ([subview isKindOfClass: [RCTShadowText class ]]) {
191
- length += [RNShadowTextGradient textLength: (RCTShadowText *)subview];
190
+ } else if ([subview isKindOfClass: [RCTTextShadowView class ]]) {
191
+ length += [RNShadowTextGradient textLength: (RCTTextShadowView *)subview];
192
192
}
193
193
}
194
194
0 commit comments