-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finally, set the entrypoint in the info.plist where the main delegate…
… is declared
- Loading branch information
Showing
5 changed files
with
35 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// SceneDelegate.swift | ||
// EntryPoint | ||
// | ||
// Created by Helder Oliveira Correia on 09/04/2020. | ||
// Copyright © 2020 Helder Oliveira. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
import SwiftUI | ||
|
||
class SomethingDelegate: UIResponder, UIWindowSceneDelegate { | ||
var window: UIWindow? | ||
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | ||
if let windowScene = scene as? UIWindowScene { | ||
let window = UIWindow(windowScene: windowScene) | ||
window.rootViewController = UIHostingController(rootView: SomethingView()) | ||
self.window = window | ||
// this is the key window to look at our app through | ||
// xcode knows the sceneDelegate as first, because its definied in the info.plist | ||
// find it in the scene configuration | ||
window.makeKeyAndVisible() | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters