Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Images not rendering in new iOS 16 Widgets?

I'm working on a new .accessoryInline widget, introduces with iOS 16. It's very simple, only displays static text and an image, said image is a custom SF Symbol, validated and also used in other places in which it works just fine (for example a .accessoryRectangular widget). Here is my code:

case .accessoryInline:
            HStack {
                Image("mysymbol.car")
                  .resizable()
                  .widgetAccentable()
                Text("My Static Title")
            }

This however only renders the text when running the app and leaves a weird small space where the image should be. Am I doing something wrong or is it a bug?

like image 1000
David Avatar asked Sep 17 '25 19:09

David


1 Answers

On iOS 17 accessoryInline widgets do not show the image, this works for me:

change

Image("xxx")

to

Image(uiImage: UIImage(named: "xxx") ?? UIImage())
like image 90
Dwarven Avatar answered Sep 21 '25 00:09

Dwarven