不使用main.storyboard

在文件Appdelegate.swift
方法didFinishLaunchingWithOptions launchOptions:中添加此段代码

window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = MyTabBarController()
window?.makeKeyAndVisible()

同时在Info.plist中删除Application requires iPhone environment

你可能感兴趣的:(不使用main.storyboard)