From 9f43bca3573e8833eb8219c6e7a829d8d92faac0 Mon Sep 17 00:00:00 2001 From: yogevbd Date: Tue, 26 Nov 2019 15:53:54 +0200 Subject: [PATCH] Fix topBar button colors on iOS 13 --- lib/ios/UIImage+tint.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ios/UIImage+tint.m b/lib/ios/UIImage+tint.m index 8a8394b3255..91380c520d9 100644 --- a/lib/ios/UIImage+tint.m +++ b/lib/ios/UIImage+tint.m @@ -3,12 +3,11 @@ @implementation UIImage (tint) - (UIImage *)withTintColor:(UIColor *)color { - UIImage *newImage = [self imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 if (@available(iOS 13.0, *)) { - return [newImage imageWithTintColor:color]; + return [self imageWithTintColor:color renderingMode:UIImageRenderingModeAlwaysOriginal]; } -#endif + + UIImage *newImage = [self imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; UIGraphicsBeginImageContextWithOptions(self.size, NO, newImage.scale); [color set]; [newImage drawInRect:CGRectMake(0, 0, self.size.width, newImage.size.height)];