1、删除info.plist中Mainstoryboard file base name键值来让程序不从stroyBoard来启动
2、打开AppDelegate.swift文件,在didFinishLaunchingWithOptions中添加如下代码:
self.window = UIWindow(frame: UIScreen.main.bounds)
self.window!.makeKeyAndVisible()
let loginVC = LoginViewController()
self.window?.rootViewController = loginVC