SwiftUI View not taking the whole space in UIHostingController

i am building an app that should run on iOS 13 and the my swiftui view is not shown correctly. There is a gap on the top and the bottom of the view. I guess the problem is within the SceneDelegate class because there I embed the view into an UIHostingController.

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
        // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
        // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
        // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
        
        // Create the SwiftUI view that provides the window contents.
        let contentView = ContentView()
        
        // Use a UIHostingController as window root view controller.
        if let windowScene = scene as? UIWindowScene {
            let window = UIWindow(windowScene: windowScene)
            window.rootViewController = UIHostingController(rootView: contentView)
            self.window = window
            window.makeKeyAndVisible()
        }
    }

I also added everything needed in the info.plist.


![]("https://developer.apple.com/forums/content/attachment/2be7b17f-c9ef-4e21-ad1d-12a0d3dc72db" "title=Simulator Screen Shot - iPhone 11 - 2023-01-27 at 11.57.50.png;width=828;height=1792")

SwiftUI View not taking the whole space in UIHostingController
 
 
Q