SwiftUI Table TableColumn header row customization?

1k Views Asked by At

I must be missing something, but is there no way to use Table/TableColumn and be able to specify the background color, and different foreground color/font for the header row? New to SwiftUI and the only way I can see doing this is by using HStack or List and individually formatting labels for 1st row perhaps?

1

There are 1 best solutions below

0
Don Nissen On

Actually it's quit easy. You use a Text field for the header.

TableColumn(Text("Column Name").foregroundStyle(.black).bold())