總結(jié)一下:
1. 將Main.storyboard和LaunchScreen.storyboard都刪掉瓮钥;
2. 把info.plist中的Launch screen interface file base name和Main storyboard file base name去掉;
3. 第三步:設置啟動頁,在Targets->my project的Launch Images Source點擊Use Asset Catalog碉熄,Migrate一下桨武;
4. 之后系統(tǒng)會給你新建一個Image Set,我們要用的當然不是這個锈津,選擇目錄中的Assets.xcassets呀酸,新建一個Launch Images;
5. 在General ->App Icons and Launch Image ->Launch Image Source 設置第四步創(chuàng)建的啟動頁琼梆;
6.在AppDelegate.m 的 application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 中添加
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[UIViewController alloc]init];
[self.window makeKeyAndVisible];
return YES;
}
7. 添加PCH文件性誉,設置PCH路徑。
Question2 :Single View Application模板的工程比Empty Application模板的工程多做了哪些工作茎杂?
Single View Application模板的工程
1. 創(chuàng)建了一個程序的UIWindow的對象错览;
2. 創(chuàng)建了一個UIViewController的對象;
3. 并將這個UIViewController的對象設置為window的根視圖煌往;
4.設置了程序的啟動頁
所以在 Single View Application 模板的工程 不需要 在在AppDelegate.m 的 application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 中添加相應的代碼
最后編輯于 :
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者