iOS 16, Xcode 14 - Widget background images are not displayed

Viewed 59

I have been testing widgets in my app ever since I downloaded Xcode 14. But I see a grey box instead of background images. Here is the code snippet.

Image("LargeBackgroundImage")
                .resizable()
                .clipped()
                .scaledToFill()
                .overlay(Color.black.opacity(0.55))
                .accessibilityHidden(true)

And this is the result.

Screenshot of iOS 16 simulator with rectangular lock screen widget

It would be helpful if anyone can share the solution. Thank you

0 Answers
Related