I\'ve been trying to redo the work on my app programmatically. (Without the use of storyboards)
I\'m almost done, except making the navigation controller manually.>
Here is another take in the SceneDelegate class:
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)
let navController = UINavigationController()
let viewController = ViewController()
navController.viewControllers = [viewController]
window.rootViewController = navController
self.window = window
window.makeKeyAndVisible()
}
}