iOS 新建空工程

1、打开xcode,新建一个Single View App。项目名称:MyTest

2、创建成功后,删除这三个文件

ViewController.h    ViewController.m   Main.storyboard

3、删除info.plist中 Main storyboard file base name 这一项

4、在AppDelegate.m的didFinishLaunchingWithOptions方法中加上这几句

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

    self.window.backgroundColor = [UIColor whiteColor];

    [self.window makeKeyAndVisible];

然后新的空工程就建好了。

原文地址:https://www.cnblogs.com/chenyanliang/p/9406324.html