Here is my code:
import SwiftUI
struct ContentView: View {
var body: some View {
Text("Apps")
.font(.system(size: 30))
.fontWeight(.bold)
Image("utm")
.resizable()
.frame(width: 60, height: 60)
Text("UTM")
.fontWeight(.bold)
Text("Virtual machines for macOS")
.foregroundColor(.gray)
Button("Get UTM") {
}
.background(Color(hue: 0.0, saturation: 0.861, brightness: 1.0))
.controlSize(.large)
.cornerRadius(25)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
And when I open canvas, this happens:

How do I turn it into 1 single content view instead of all of the segments being split up?
>Solution :
This is because you need to use a stack like this
struct ContentView: View {
var body: some View {
VStack {
Text("Apps")
.font(.system(size: 30))
.fontWeight(.bold)
Image("utm")
.resizable()
.frame(width: 60, height: 60)
Text("UTM")
.fontWeight(.bold)
Text("Virtual machines for macOS")
.foregroundColor(.gray)
Button("Get UTM") {
}
.background(Color(hue: 0.0, saturation: 0.861, brightness: 1.0))
.controlSize(.large)
.cornerRadius(25)
}
}
}