VStack will not fill screen

246 Views Asked by At

I use this Exact code and the screen is still not filled completely. What am I missing?

This is the main appView:

@main
struct HistoryMarkerApp: App {
    @StateObject var firestoreManager = FirestoreManager()

    init() {
        FirebaseApp.configure()
    }
    
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

ContentView:

var body: some View {
        VStack(alignment: .leading) {
          Text("Hello World")
            .font(.title)
          Text("Another")
            .font(.body)
          Spacer()
        }
        .frame(
          minWidth: 0,
          maxWidth: .infinity,
          minHeight: 0,
          maxHeight: .infinity,
          alignment: .topLeading
        )
        .background(Color.red)
      }

enter image description here

1

There are 1 best solutions below

0
wwarren07 On

Fixed: I had to re-create the Launch Screen variable in the info.plist (target info) file.

project target -> info:

Launch Screen

  • UILaunchScreen

Thanks for trying to help.