|
@@ -3,12 +3,11 @@
|
3
|
3
|
@implementation UIImage (tint)
|
4
|
4
|
|
5
|
5
|
- (UIImage *)withTintColor:(UIColor *)color {
|
6
|
|
- UIImage *newImage = [self imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
7
|
|
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
|
8
|
6
|
if (@available(iOS 13.0, *)) {
|
9
|
|
- return [newImage imageWithTintColor:color];
|
|
7
|
+ return [self imageWithTintColor:color renderingMode:UIImageRenderingModeAlwaysOriginal];
|
10
|
8
|
}
|
11
|
|
-#endif
|
|
9
|
+
|
|
10
|
+ UIImage *newImage = [self imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
12
|
11
|
UIGraphicsBeginImageContextWithOptions(self.size, NO, newImage.scale);
|
13
|
12
|
[color set];
|
14
|
13
|
[newImage drawInRect:CGRectMake(0, 0, self.size.width, newImage.size.height)];
|