I do not see the initial ViewController in appDelegate swift

0

I'm used to defining in the application appDelegate the viewController with which the application starts, for example:

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

    //inicializar la aplicación
    window = UIWindow(frame: UIScreen.main.bounds)

    let mainVC = MainVC()
    let navigationController = UINavigationController(rootViewController: mainVC)

    navigationController.setNavigationBarHidden(true, animated: true)
    window?.rootViewController = navigationController
    window?.makeKeyAndVisible()
    return true
}

However, I have found projects (in cocoapods especially) that have nothing defined in the appDelegate and the application starts in a specific Controller, even though there is more than one in the same route.

What is the execution rule of the ViewController default? Is there something inside the controller that I am omitting and that allows to run as default controller?

    
asked by Salvador Nava 15.06.2018 в 04:41
source

1 answer

0

If you have a defined storyboard, you can indicate which is the initial viewcontroller. In the project you have defined what the initial storyboard is. So iOS knows which is the storyboard that has to start and knows which driver has to start

    
answered by 15.06.2018 / 06:31
source