IOS 移除storyboard
生活随笔
收集整理的这篇文章主要介绍了
IOS 移除storyboard
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
为什么80%的码农都做不了架构师?>>>
我是IOS新手,都说storyboard是个好东西,但是我搞了一会始终没有搞懂,并且我觉得学习一门语言,使用类似以前网页三剑客这种所见所得工具,不太利于学习,所以我就想着移除storyboard
1:我们通过xcode新建的项目,默认会有个Main.storyboard ,我们就是要干掉这个
2:移除storyboard
3:删除Main.storyboard 之后,再启动app就和黑屏,这个时候就需要修改代码
在AppDelegate.m文件中didFinishLaunchingWithOptions方法加入以下代码
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {// Override point for customization after application launch. self.window=[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; RootViewController *rootView = [[RootViewController alloc] init]; self.window.rootViewController = rootView; [self.window makeKeyAndVisible]; return YES; }其中RootViewController自己新建一个出来(我设置RootViewController的背景是红色的)
上面步骤做完之后,我们就可以开开心心学习OC了。。后期有时间在慢慢研究storyboard
原文地址: IOS 移除storyboard
标签: ios
智能推荐
- 运维技能大全 | Devops Tools 周期表
- 【ZBar】ios错误ignoring file xxx missing required architecture x86_64 in file
- linux shell工具集合
- Nginx 禁用IP IP段
- 【No.3 Ionic】超级逗表情 App
转载于:https://my.oschina.net/54php/blog/600297
总结
以上是生活随笔为你收集整理的IOS 移除storyboard的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: CIKERS Shane 2019061
- 下一篇: Github新建分支以处理原仓库提交时d