Xcode6.0+建立一個empty application步驟:

一、選擇模版Single View Applicationspa

二、將Main.storyboard 和LaunchScreen.xib刪除get

三、在Info.plist中,把Launch screen interface file base name 以及Main storyboard file base name刪除it

四、點擊在target裏的Use Asset Catalog,對話框裏直接點擊Migrateio

五、在AppDelegate的第一個方法裏面添加代碼:class

 

OC:file

(1)、建立window方法

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];模版

(2)、設置window背景tab

self.window.backgroundColor = [UIColor whiteColor];storyboard

(3)、使window可見

[self.window makeKeyAndVisible];

 

Swift

self.window = UIWindow(frame:UIScreen.mainScreen().bounds);

self.window!.backgroundColor = UIColor.whiteColor();

self.window!.makeKeyAndVisible();

相關文章
相關標籤/搜索