(1)删除系统的ViewController.m和.h文件 (sb也是系统生成的相当于viewController的xib文件,删不删sb没什影响)。在Deployment Info 中 把Main Interface 的Main 去掉 这样才不会加载sb。
(2)创建自己的ViewController文件RootViewController
① 在AppDelegate.m中导入自己的.h文件
② 在入口类方法里写上如下代码
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
RootViewController *vc = [[RootViewController alloc]init];
[self.window setRootViewController:vc];
[self.window makeKeyAndVisible];
// makeKeyAndVisible 此方法一般加在最后 作用是把视图放置在最前端