新建一个去除storyboard的项目

新建一个去除storyboard的项目

1. 新建项目并删除 *.storyboard 以及与之相关的杂项

2. 设置 UIWindow 的 rootViewController

复制粘贴代码如下

    self.window                    = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.backgroundColor    = [UIColor whiteColor];
    self.window.rootViewController = [ViewController new];
    [self.window makeKeyAndVisible];

3. 新建pch文件

 

复制粘贴的代码

/*-------------------------------------------------
 * $(SRCROOT)/$(PROJECT_NAME)/YourProjectName.pch *
 -------------------------------------------------*/

#import <Availability.h>

#ifndef __IPHONE_4_0

#warning "This project uses features only available in iOS SDK 4.0 and later."

#endif

#ifdef __OBJC__

/* Add your header file here. */

#endif

4. 添加支持app图标以及启动页(请在真机上测试启动页显示问题)

5. 设置相关图标支持并去除警告信息

*6 一些细节

原文地址:https://www.cnblogs.com/YouXianMing/p/5038002.html