SwiftUI-视图的背景色
2019-11-19 本文已影响0人
白色天空729
原文:https://iosdevcenters.blogspot.com/2019/09/swiftui-background-color-in-view.html
import SwiftUI
struct ContentView: View {
var body: some View {
Color.purple.edgesIgnoringSafeArea(.all)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
效果如图:
image.png