挺久没有写ios的代码,今天想写个demo练练手,一开始我就纯代码的写了window 把main interface的main删除了 结果跑不起啦!!!这里记录一下
删除main interface的main

删除main.storyboard

AppDelegate 添加代码

window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = ViewController()
window?.backgroundColor = UIColor.white
window?.makeKeyAndVisible()
网友评论