LoginSignup
2
1

More than 5 years have passed since last update.

最速でストーリーボード(Storyboard)を使わないサンプルiOSアプリを作る

Last updated at Posted at 2018-09-10
  1. Single View App プロジェクトを作成する。
  2. Main.storyboard を削除する。
  3. Deployment Info の Main Interface にある "Main" を削除する。
  4. 以下のコードを 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
}

以上です。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1