In SwiftUi I have a list with dates.
There is padding to the left of each list item that I can't figure out how to correct....
This is my body view
var body: some View {
VStack(alignment: .leading, spacing: 0){
NavigationView {
List{
ForEach(calObject.dateArray,id: .self){date in
DateRow(date: date)
}
}.navigationBarTitle("(calObject.nameOfMonth(calObject.stepper))")
}
}
And this is my DateRow view
struct DateRow: View {
@ObservedObject private var calObject = CalendarObject()
var date: Date
var body: some View {
HStack(){
Text(calObject.rowDateFormatter(date).prefix(3)).bold()
.foregroundColor(.white)
.padding()
.background(Color.gray)
.mask(Circle())
.padding(.trailing)
Text("(calObject.rowDateFormatter(date))")
Spacer()
}
}
Somebody who can help me with this really frustrating situation? =/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…