- info.plist:需要加載的Storyboard文件名
- AppDelegate.swift:didFinishLaunching....啟動完成
- 選擇Storyboard中的入口界面加載(ViewController.swift)
- 加載完成:viewDidLoad
不使用Storyboard
- Info.plish
- didFinishLaunching:...啟動完成
- 代碼加載窗口和頁面
如果刪除了Main.storyboard,那酒要自行在 AppDelegate.swift:didFinishLaunching中設置了:
//(0, 0, 屏幕寬度, 屏幕高度)
let rect = UIScreen.mainScreen().bounds
self.window = UIWindow(frame: rect)
//設置要顯示的第一個界面
let viewCtrl = ViewController2016()
self.window?.rootViewController = viewCtrl
//顯示窗口
self.window?.makeKeyAndVisible()