1、创建project
single view app
删除viewController and .xib
创建测试主页RootViewController
2、Delegate.h
didFinishLaunchingWithOptionsh函数添加:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
RootViewController *viewController = [[RootViewController alloc] init];
//设置当前window的主控制器
self.window.rootViewController = viewController;
//设置主界面并显示
[self.window makeKeyAndVisible];
3、创建Supporting Files
放:Info.plist、项目-Prefix.pch,备注:记得在Build Settings改配置地址
3.1、Info.plist修改和添加:
删除:Main storyboard file base name
添加:Bundle display name : 应用名
添加:App Transport Security Settings
|-> Allow Arbitrary Loads Boolean YES
这是开启http访问,不添加该字段导致不能访问http,只能访问https。
如果info.plist换位置
PROJECT->TARGETS->项目->Build Settings->All|Levels->Packaging->Info.plist File->项目/目录/Info.plist
3.2、pch创建
命名:项目名-Prefix.pch
PROJECT->TARGETS->项目->Build Settings->All|Levels->Precompile Prefix Header->NO改成YES
PROJECT->TARGETS->项目->Build Settings->All|Levels->Prefix Header->$(SRCROOT)/工程名/目录/项目名-Prefix.pch
4、修改项目配置
关闭bitCode
找到项目名称->TARGETS->项目名->Build Settings->Build Options->Enable Bitcode->PROJECT项改成NO
build setting中搜索bitCode 改为NO
这是为了导入第三方等
====================创建相关目录和分类=======================
====================Nav+Tabbar框架=======================