- Single View App プロジェクトを作成する。
- Main.storyboard を削除する。
- Deployment Info の Main Interface にある "Main" を削除する。
- 以下のコードを AppDelegate.Swift に記述する。
AppDelegate.Swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
let homeViewController = UIViewController()
homeViewController.view.backgroundColor = .blue
window!.rootViewController = homeViewController
window!.makeKeyAndVisible()
return true
}
以上です。