change background color of uiview swift code example
Example 1: swift change background color
self.view.backgroundColor = UIColor.red
Example 2: swiftui background color
Group {
//Views inside the highest view in the hierarchy
}.background(Color.red.edgesIgnoringSafeArea(.all))