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.>
self.window = UIWindow(frame: UIScreen.main.bounds)
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let storyboard_Secondary = UIStoryboard(name: "Secondary", bundle: nil)
var initialViewController = UIViewController()
let aUser = CommonMethods.loadCustomObject("\(Constants.kUserProfile)") as? User
if aUser?.respCode == 1 {
initialViewController = storyboard_Secondary.instantiateViewController(withIdentifier: "MainTabVC")
UIApplication.shared.statusBarStyle = .lightContent
let navigationController = UINavigationController(rootViewController: initialViewController)
navigationController.isNavigationBarHidden = true
self.window!.rootViewController = navigationController
self.window!.makeKeyAndVisible()
}