-1

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

wwarren07
  • 17
  • 9
  • 1
    The code you shared fills the entire screen if it is the root view. It looks like the body you shared is nested in some other views. Please provide the code of any ancestor views. – Alexander Costa Mar 21 '22 at 18:58
  • Please add the code to your initial post with proper formatting. The code you shared here still doesn't describe the whole view hierarchy. Is the `body` you shared in your initial post the body of `ContentView`? – Alexander Costa Mar 21 '22 at 19:11

1 Answers1

0

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.

wwarren07
  • 17
  • 9