teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

修正

2016/07/13 13:07

投稿

_Kentarou
_Kentarou

スコア8490

answer CHANGED
@@ -1,3 +1,29 @@
1
1
  `General` > `Deployment Info` > `Main Interface` で`Login.storyboard`を選択してください。
2
2
 
3
- ![u](a1d4dc54d4c875dc1a643d3f1fa6218a.png)
3
+ ![u](a1d4dc54d4c875dc1a643d3f1fa6218a.png)
4
+
5
+ Storyboardコードでの指定
6
+ ---
7
+
8
+ ```swift
9
+ import UIKit
10
+
11
+ @UIApplicationMain
12
+ class AppDelegate: UIResponder, UIApplicationDelegate {
13
+
14
+ var window: UIWindow?
15
+
16
+ func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17
+
18
+ let storyboard = UIStoryboard.init(name: "Login", bundle: nil)
19
+ let loginViewController = storyboard.instantiateInitialViewController()
20
+
21
+ self.window!.rootViewController = loginViewController
22
+
23
+ self.window!.backgroundColor = UIColor.whiteColor()
24
+ self.window!.makeKeyAndVisible()
25
+
26
+ return true
27
+ }
28
+ }
29
+ ```