For example, store the image in Assets.xcassets
as follows
In this case, you can write the source as follows.
Image("news") // ./Assets.xcassets/Display news
Image("01d") // ./Assets.xcassets/WeatherIcons/Display 01d
I don't like it, so check the Provide namespace here
Then, you can call out the image with the following writing style.
Image("news") // ./Assets.xcassets/Display news
Image("WeatherIcons/01d") // ./Assets.xcassets/WeatherIcons/Display 01d
If you want to use an image with the same file name if you give a reason other than "dislike", is it?
Recommended Posts