Skip to content

Commit

Permalink
[MacCatalyst] [iOS] Fix IconTintColorBehavior ImageButton Disappearin…
Browse files Browse the repository at this point in the history
…g and Crash On Source Change (#2317)
  • Loading branch information
Bensley96 authored Nov 5, 2024
1 parent 8e8e60a commit 309c27a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static void ApplyTintColor(UIView platformView, View element, Color? color)

static void SetUIButtonTintColor(UIButton button, View element, Color color)
{
if (button.ImageView.Image is null)
if (button.ImageView.Image is null || button.CurrentImage is null)
{
return;
}
Expand All @@ -122,4 +122,4 @@ static void SetUIImageViewTintColor(UIImageView imageView, View element, Color c
imageView.Image = imageView.Image.ImageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate);
imageView.TintColor = color.ToPlatform();
}
}
}

0 comments on commit 309c27a

Please sign in to comment.