From 857d009c916693a7e45702497549149d599eb60d Mon Sep 17 00:00:00 2001 From: Ortwin Gentz Date: Fri, 21 Feb 2020 13:23:24 +0100 Subject: [PATCH] Fix showImage for images already tagged as template images --- SVProgressHUD/SVProgressHUD.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SVProgressHUD/SVProgressHUD.m b/SVProgressHUD/SVProgressHUD.m index 3b72759c..97bef929 100644 --- a/SVProgressHUD/SVProgressHUD.m +++ b/SVProgressHUD/SVProgressHUD.m @@ -858,14 +858,14 @@ - (void)showImage:(UIImage*)image status:(NSString*)status duration:(NSTimeInter [strongSelf cancelIndefiniteAnimatedViewAnimation]; // Update imageView + UIImage *assignableImage = image; if (self.shouldTintImages) { if (image.renderingMode != UIImageRenderingModeAlwaysTemplate) { - strongSelf.imageView.image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; + assignableImage = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; } - strongSelf.imageView.tintColor = strongSelf.foregroundImageColorForStyle; - } else { - strongSelf.imageView.image = image; + strongSelf.imageView.tintColor = strongSelf.foregroundColorForStyle;; } + strongSelf.imageView.image = assignableImage; strongSelf.imageView.hidden = NO; // Update text