79174129

Date: 2024-11-10 04:22:42
Score: 2
Natty:
Report link

Is song.image the full path of asset you have? If so, you should initialize UIImage first, and then pass UIImage into Image

e.g.

instead of

Image(song.image)

use

Image(uiImage: UIImage(named: song.image)!)

Check the documentation for Image and UIImage to see various ways of initializing each object

https://developer.apple.com/documentation/swiftui/image

https://developer.apple.com/documentation/swiftui/image/init(uiimage:)

https://developer.apple.com/documentation/uikit/uiimage

https://developer.apple.com/documentation/uikit/uiimage/1624146-init

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Anonymous