Changing the Image Icon Color in a Label

Paul Snell
1 min readAug 14, 2020

--

Once I had the image icon resized to what I wanted I needed to change its color. I found applying a simple .foreground(_) function to the label was not going to cut it. Since I’m using icons I get from Icons8 I needed to indicate to the system the image can be colored. Luckily a quick Google search lead me to this StackOverflow question where the solution was as easy as applying .renderingMode(.template) property.

Icons were taken from Icons8.

--

--

Paul Snell

Currently an independent iOS app developer as a hobby while I work full time. My website can be found here: https://www.randomdino.com/