Xcode 新建工程去除 Main.Storyboard
一共三步:
- 找到 info.plist -> 删除 Main storyboard file base name 键和值
- 删除 Main.Storyboard
- 在 AppDelegate.swift 加上
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
self.window = UIWindow(frame: UIScreen.main.bounds)
self.window?.backgroundColor = UIColor.white
self.window?.rootViewController = XXXViewController()
self.window?.makeKeyAndVisible()
return true
}