相关疑难解决方法(0)

SwiftUI列表颜色背景

如果我列出静态项目,则无法更改视图的背景颜色。这是我的代码:

NavigationView {
        ZStack {
            Color("AppBackgroundColor").edgesIgnoringSafeArea(.all)
            List {
                Section(header: Text("Now in theaters")) {
                    ScrollMovies(type: .currentMoviesInTheater)
                }
                Section(header: Text("Popular movies")) {
                    ScrollMovies(type: .popularMovies)
                }
            }.listStyle(.grouped)
        }
    }
Run Code Online (Sandbox Code Playgroud)

list colors ios swift swiftui

7
推荐指数
4
解决办法
1835
查看次数

标签 统计

colors ×1

ios ×1

list ×1

swift ×1

swiftui ×1