admin管理员组

文章数量:1279124

I am new to swift IOS development by making hello world I tried to summarize my problem. I am unable to make app in full screen need help. I even added Launch Screen. I am attaching screen shots. Please help me to make it full screen.

//
//  hello_worldApp.swift
//  hello world
//
//
import SwiftUI

@main
struct hello_worldApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

    import SwiftUI

struct ContentView: View {
    var body: some View {
        VStack {
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundStyle(.tint)
            Text("Hello, world!")
        }
        .padding()
        
    }
}

#Preview {
    ContentView()
}

I am new to swift IOS development by making hello world I tried to summarize my problem. I am unable to make app in full screen need help. I even added Launch Screen. I am attaching screen shots. Please help me to make it full screen.

//
//  hello_worldApp.swift
//  hello world
//
//
import SwiftUI

@main
struct hello_worldApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

    import SwiftUI

struct ContentView: View {
    var body: some View {
        VStack {
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundStyle(.tint)
            Text("Hello, world!")
        }
        .padding()
        
    }
}

#Preview {
    ContentView()
}
Share Improve this question edited Feb 24 at 17:17 HangarRash 15.1k5 gold badges19 silver badges55 bronze badges asked Feb 24 at 9:13 Mandeep ChaudharyMandeep Chaudhary 651 silver badge12 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 0

⚠️ This is NOT related to the code! It is about the project configuration!

I even added Launch Screen

You probably removed the UILaunchScreen key from the info plist by mistake and fet to add it again. Make sure it exists there:

Note that the key should exist even if you don't provide any launch screens.

本文标签: swiftuiWhy is my iOS App not showing full ScreenStack Overflow