-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PATCH]: react-native-fast-image iOS 17 spec (#5188)
* fix: patch rnfi to iOS 17 spec * add initial and new patch * delete original patch file * add nl char
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
patches/react-native-fast-image+8.5.11+fix-make-image.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff --git a/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m b/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m | ||
index 9c0f1d3..db4da88 100644 | ||
--- a/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m | ||
+++ b/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m | ||
@@ -70,12 +70,12 @@ - (void)setImageColor:(UIColor *)imageColor { | ||
} | ||
|
||
- (UIImage*)makeImage:(UIImage *)image withTint:(UIColor *)color { | ||
- UIImage *newImage = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; | ||
- UIGraphicsBeginImageContextWithOptions(image.size, NO, newImage.scale); | ||
- [color set]; | ||
- [newImage drawInRect:CGRectMake(0, 0, image.size.width, newImage.size.height)]; | ||
- newImage = UIGraphicsGetImageFromCurrentImageContext(); | ||
- UIGraphicsEndImageContext(); | ||
+ UIImage* newImage = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; | ||
+ UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:image.size]; | ||
+ newImage = [renderer imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) { | ||
+ [color setFill]; | ||
+ [newImage drawInRect:CGRectMake(0, 0, image.size.width, newImage.size.height)]; | ||
+ }]; | ||
return newImage; | ||
} | ||
|
File renamed without changes.