I'd like to adapt my widget's size to the widget contents overall size. The problem is, that the standard shape (background of the widget) defaults to the available space and I don't want to hardcode the frame of it. Any suggestions e.g. using GeometryReader?
struct WidgetView: View {
var body: some View {
ZStack {
RoundedRectangle(cornerRadius: 40, style: .continuous)
.foregroundColor(.gray)
Text("TestingText")
}
}
}
