原文: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
网友评论