百思学习笔记01-基本配置
2016-02-06 09:44
579 查看
在网上找到了大神MJ的百思视频,我准备在这里写一份学习笔记
首先创建项目,这个项目是不用Storyboard的,先干掉它和LaunchScreen.storyboard
然后在项目名下选择General 删掉Lauch Screen File的里的LaunchScreen.storyboard文件
然后点击launch Images Source -> Use Asset Catalog ->Migrate
就可以把launch图片拖进Images.xcassets里面了
现在没有Storyboard了,界面是无法显示的,我们要在AppDelegate.m文件下编写代码
运行就可以显示viewController的界面了,如果是黑色无法判断,请在viewController.m下
我也是初学者有不对的地方请大牛门批评指正
首先创建项目,这个项目是不用Storyboard的,先干掉它和LaunchScreen.storyboard
然后在项目名下选择General 删掉Lauch Screen File的里的LaunchScreen.storyboard文件
然后点击launch Images Source -> Use Asset Catalog ->Migrate
就可以把launch图片拖进Images.xcassets里面了
现在没有Storyboard了,界面是无法显示的,我们要在AppDelegate.m文件下编写代码
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. // 创建窗口 self.window = [[UIWindow alloc] init]; self.window.frame = [UIScreen mainScreen].bounds; //必须设置尺寸否则无法显示 // 设置窗口的根控制器 self.window.rootViewController = [[ViewController alloc] init]; // 显示窗口 [self.window makeKeyAndVisible]; return YES; }
运行就可以显示viewController的界面了,如果是黑色无法判断,请在viewController.m下
- (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor redColor]; }
我也是初学者有不对的地方请大牛门批评指正
相关文章推荐
- Android.mk: recipe commences before first target. Stop.
- viewpagerindicator的取代品之一TabLayout(谷歌官方控件)
- LeetCode:Valid Palindrome
- migrate遇到err mongoid[not found]
- 策略模式和桥接模式的区别。
- migrate遇到err mongoid[not found]
- 上海趣搭网络科技有限公司
- 全局函数VS成员函数
- 浅析Javascript匿名函数与自执行函数
- High Performance MySQL Chapter2
- ORACLE中dual用法详解
- Android应用调试经常使用知识
- String String s = new String("asd") 涉及对象数目
- 吾诺瀚卓网络科技有限公司
- JavaScript学习 八、DOM扩展
- Beginning Python Chapter9
- Python爬取一个网页的图片
- Windows桌面应用开发-MSDN教程-结构树
- Android平台的崩溃捕获机制及实现
- Github实例教程-创建库、创建主页