I'm creating Widget for iOS app by using WidgetKit but I faced one problem width padding or safeArea here is code and output is like this but I want to cover all view by red
ZStack {
Color.red
.ignoresSafeArea()
}.ignoresSafeArea()
I want to cover red color all view
Use this to set the background of your widget:
YourWidgetView()
.containerBackground(for: .widget) { Color.red }