Skip to content

Commit cf2f8c5

Browse files
committed
canRenderString
1 parent 6daa1ee commit cf2f8c5

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Optional. If true gradient will be calculated for text view background frame rat
9292

9393
## Usage with rn 0.56.0
9494

95-
react-native should be patched, because of failing invariant checks
95+
To remove failing invariant checks react-native should be patched
9696

9797
`$ node node_modules/react-native-text-gradient/patch-rn.js`
9898

TextGradientExample/ios/TextGradientExample.xcodeproj/project.pbxproj

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,6 @@
302302
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = "<group>"; };
303303
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; };
304304
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; };
305-
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
306-
00E356F21AD99517003FC87E /* TextGradientExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TextGradientExampleTests.m; sourceTree = "<group>"; };
307305
09A81A58D46E4588AF4811A5 /* RNTextGradient.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNTextGradient.xcodeproj; path = "../node_modules/react-native-text-gradient/ios/RNTextGradient.xcodeproj"; sourceTree = "<group>"; };
308306
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
309307
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
@@ -390,23 +388,6 @@
390388
name = Products;
391389
sourceTree = "<group>";
392390
};
393-
00E356EF1AD99517003FC87E /* TextGradientExampleTests */ = {
394-
isa = PBXGroup;
395-
children = (
396-
00E356F21AD99517003FC87E /* TextGradientExampleTests.m */,
397-
00E356F01AD99517003FC87E /* Supporting Files */,
398-
);
399-
path = TextGradientExampleTests;
400-
sourceTree = "<group>";
401-
};
402-
00E356F01AD99517003FC87E /* Supporting Files */ = {
403-
isa = PBXGroup;
404-
children = (
405-
00E356F11AD99517003FC87E /* Info.plist */,
406-
);
407-
name = "Supporting Files";
408-
sourceTree = "<group>";
409-
};
410391
139105B71AF99BAD00B5F7CC /* Products */ = {
411392
isa = PBXGroup;
412393
children = (
@@ -540,7 +521,6 @@
540521
children = (
541522
13B07FAE1A68108700A75B9A /* TextGradientExample */,
542523
832341AE1AAA6A7D00B99B32 /* Libraries */,
543-
00E356EF1AD99517003FC87E /* TextGradientExampleTests */,
544524
83CBBA001A601CBA00E9B192 /* Products */,
545525
2D16E6871FA4F8E400B85C8A /* Frameworks */,
546526
7416143C20EFF5C100782E92 /* Recovered References */,
@@ -1016,6 +996,7 @@
1016996
"-lc++",
1017997
);
1018998
PRODUCT_NAME = TextGradientExample;
999+
TARGETED_DEVICE_FAMILY = "1,2";
10191000
VERSIONING_SYSTEM = "apple-generic";
10201001
};
10211002
name = Debug;
@@ -1038,6 +1019,7 @@
10381019
"-lc++",
10391020
);
10401021
PRODUCT_NAME = TextGradientExample;
1022+
TARGETED_DEVICE_FAMILY = "1,2";
10411023
VERSIONING_SYSTEM = "apple-generic";
10421024
};
10431025
name = Release;

src/create-text-gradient-class.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ const createTextGradientClass = (
6666
*/
6767

6868
const TextGradient = createReactClass({
69+
statics: {
70+
canRenderString: true
71+
},
6972
displayName: uiViewClassName,
7073
propTypes: {
7174
/**

0 commit comments

Comments
 (0)