MendelG is searching for a solution from a good supply.
I am new to WidgetKit and I am making an attempt to create a widget. I’ve constructed a easy grid to show the times of a month as proven under:
struct extenEntryView : View {
@Setting(.widgetFamily) non-public var widgetFamily
var entry: SimpleEntry
let daysOfMonth = Array(1…30).map(String.init)
var physique: some View {
let columns = Array(repeating: GridItem(.versatile()), depend: 7)
VStack() {
LazyVGrid(columns:columns, content material: {
ForEach(daysOfMonth, id: .self) { day in
Textual content(day)
.daring()
.body(width: .infinity)
.foregroundColor(.orange)
}
})
}
.setting(.layoutDirection, .rightToLeft)
.widgetBackground(Coloration(.black))
}
}
Once I visualize the widget in numerous sizes, it behaves inconsistently. The format particularly breaks within the smaller widget sizes. For instance, here is the output on a small widget:
Nevertheless, my desired output seems like this (however for the small widget):
As could be seen, the textual content appears to leap round within the smaller sizes.
How can I make this format extra adaptive and constant throughout totally different widget sizes?
My finish objective is to have the widget adaptive as a lock display screen widget for Ios 16 and above