SwiftUI 列表背景颜色

时间:2021-05-22 17:14:17

标签: swiftui

SwiftUI,我有一个列表,有时没有足够的项目来填充它,结果我看到底部的白色“背景”。

enter image description here

List {
    ListItemCell(item: "xxx")
    ListItemCell(item: "xxx")
    ListItemCell(item: "xxx")
}
.cornerRadius(15)
.border(Color.black, width: 2)

我已经厌倦了应用背景项目,但没有任何区别,即

List {
    ListItemCell(item: "xxx")
    ListItemCell(item: "xxx")
    ListItemCell(item: "xxx")
}
.background(Color.blue)
.cornerRadius(15)
.border(Color.black, width: 2)

有人有什么想法吗?

0 个答案:

没有答案