纯代码创建工程

2018-11-16  本文已影响0人  浮生若梦_337d

创建一个新工程

删除MainStoryBord LauchScreen.storyboard ViewController.m,ViewController.h 

Targets—General将Launch Screan File设置为空

Targets—General—Deployment info 将MainIterface 设置为空

Assets.xcassets中添加一个LauchImage 

将Launch Images Source 设置为Assets.xcassets中的LauchImage

代码:

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

self.window.rootViewController = xxx;

self.window.backgroundColor = [UIColor whiteColor];

 [self.window makeKeyAndVisible];

上一篇 下一篇

猜你喜欢

热点阅读