36 lines
1.0 KiB
Swift
36 lines
1.0 KiB
Swift
//
|
|
// AppDelegate.swift
|
|
// Verdnatura
|
|
//
|
|
// Created by Enrique Blasco Blanquer on 25/12/20.
|
|
//
|
|
|
|
import UIKit
|
|
import WebKit
|
|
|
|
@main
|
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
|
|
var window: UIWindow?
|
|
|
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
|
// Override point for customization after application launch.
|
|
// Get selected language if already there, otherwise check preferred languages on basis of locale if available then set to default language else english
|
|
|
|
|
|
self.initRootView()
|
|
|
|
return true
|
|
}
|
|
|
|
func initRootView(){
|
|
// init root controller of application and setting it to window
|
|
let storyboard = UIStoryboard(name: "Main", bundle: Bundle.main)
|
|
let rootController: UIViewController = storyboard.instantiateViewController(withIdentifier: "appNavigationController")
|
|
|
|
window?.rootViewController = rootController
|
|
}
|
|
|
|
}
|
|
|