Here’s a way to change the background colour of a List
at runtime, using a new modifier that will become available in iOS 16. Changing this background is otherwise extremely difficult, as it is basically a UITableView
in a UIViewRepresentable
wrapper.
I actually wrote in Daily Coding Tip 067 in April that there was a solution for iOS 15, but it involved modifying the UITableView
.