Thanks for your reply!
I was able to confirm that the method you suggested worked correctly.
I also discovered that it works correctly without AccessoryWidgetBackground().
Button(intent: intent) {
ZStack {
if showsWidgetContainerBackground {
Color.black
} else {
Color.primary.opacity(0.15)
//AccessoryWidgetBackground()
}
...
}
}
.buttonStyle(.plain)
.widgetURL(URL(string: "widget://" + intent.id))
This problem seems to occur when using both AccessoryWidgetBackground() and .buttonStyle(.plain).
Maybe this is a bug?
I'll add this information to the feedback(FB15151000).
Thank you very much for your help!
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: