mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-29 11:12:18 +03:00
29 lines
1.4 KiB
Diff
29 lines
1.4 KiB
Diff
|
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 f710081..fe20770 100644
|
||
|
--- a/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m
|
||
|
+++ b/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m
|
||
|
@@ -73,12 +73,17 @@ - (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();
|
||
|
- return newImage;
|
||
|
+
|
||
|
+ UIGraphicsImageRendererFormat *format = [UIGraphicsImageRendererFormat defaultFormat];
|
||
|
+ UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:image.size format:format];
|
||
|
+
|
||
|
+ UIImage *resultImage = [renderer imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {
|
||
|
+ CGRect rect = CGRectMake(0, 0, image.size.width, image.size.height);
|
||
|
+ [color set];
|
||
|
+ [newImage drawInRect:rect];
|
||
|
+ }];
|
||
|
+
|
||
|
+ return resultImage;
|
||
|
}
|
||
|
|
||
|
- (void) setImage: (UIImage*)image {
|