![](/img/trans.png)
[英]SwiftUI - Unable to set background color of List in iOS 15 (works in iOS 14)
[英]Is there a way to change the background color of a List in SwiftUI? 2020 (iOS 14)
Swift 5, Xcode 12, iOS 14
我能夠通過幾行代碼使用Introspect庫來完成此操作:
List {
...
}
.introspectTableView { tableView in
tableView.backgroundColor = .yellow
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.