Using Xcode 12.3 beta.
using the following...
NavigationView {
List {
Section(header: Text("Blaa Blaa").fontWeight(.bold)) {
ForEach(0 ..< 9) { number in
HStack {
Button("Left Row \(number)") {
// set values here
}
Spacer()
Text("Center Row \(number)")
Spacer()
Text("Right Row \(number)")
}
}
.foregroundColor(Color.white)
.shadow(color: Color.black.opacity(0.4), radius: 2, x: 4, y: 4)
}
}
.listRowBackground(Color.gray)
Then repeat to create 4 sections....
What will happen when redered as views is line items will RANDOMLY change the font to a bold typeface. This happens when scrolling or if this View is the target on a NavigationLink the open/close section arrows will cause items to redraw using bold font.
I did find a "fix"
if you add .font(.body) to the HStack within the ForEach the problem goes away.
Stephen.
using the following...
NavigationView {
List {
Section(header: Text("Blaa Blaa").fontWeight(.bold)) {
ForEach(0 ..< 9) { number in
HStack {
Button("Left Row \(number)") {
// set values here
}
Spacer()
Text("Center Row \(number)")
Spacer()
Text("Right Row \(number)")
}
}
.foregroundColor(Color.white)
.shadow(color: Color.black.opacity(0.4), radius: 2, x: 4, y: 4)
}
}
.listRowBackground(Color.gray)
Then repeat to create 4 sections....
What will happen when redered as views is line items will RANDOMLY change the font to a bold typeface. This happens when scrolling or if this View is the target on a NavigationLink the open/close section arrows will cause items to redraw using bold font.
I did find a "fix"
if you add .font(.body) to the HStack within the ForEach the problem goes away.
Stephen.