Xcode6 用xib文件 创建窗口
来源:互联网 发布:mac 图库 导出 编辑:程序博客网 时间:2024/06/05 00:10
Xcode6 用xib文件 创建窗口
1. 用xib 文件创建
1. 打开xcode File -- > New... --> file... -- >View
2.View和视图做个关联
(1) 打开nib文件
(2)点击"File's Owner", 按command+4,设置Class为xxxViewControler
(3) 按Control+"Files's Owner", 里面有个默认的IBOutlet变量view, 看一下后面有没有做关联,如果没有就拉到下面的View和视图做个关联
4.用xib文件,创建view界面
FirstViewController* firstViewController =[[FirstViewControlleralloc]initWithNibName:@"firstTT"bundle:nil];
2.用storyboard 中的View Controller 创建view界面
1.在storyboard中创建view controller 界面
2.把storyboard 中的view controller Sotryboard ID 设置为first
3.添加代码 创建界面
UIStoryboard *futureStoryBoard = [UIStoryboardstoryboardWithName:@"Main"bundle:nil];
FirstViewController* firstViewController = [futureStoryBoard instantiateViewControllerWithIdentifier:@"first"];
为了大家写代码时能有完整参考,特传上了源码
http://download.csdn.net/detail/liuyinghui523/8491405
1 0
- Xcode6 用xib文件 创建窗口
- 用Xcode6创建xib窗口
- Xcode6.1创建仅xib文件无storyboard的hello world应用
- xcode6创建分类文件
- Xcode6 创建.pch文件
- xcode6 创建pch文件
- iOS用xib文件创建UITableView
- Xib文件创建UITableViewCell
- Xib文件创建UITableViewCell
- 手动创建XIB文件
- xcode6.1创建pch文件
- Xcode6 之后 PCH 文件创建
- xcode6创建pch文件方式
- Xcode6中创建pch文件
- Xcode6中创建pch文件
- iOS xcode6 xib文件视图屏幕预览功能
- Xib文件创建hello world
- Xib文件创建hello world
- 三个Meta标签:X-UA-Compatible,MSSmartTagsPreventParsing,MSThemeCompatible用法
- CTR初始化
- java布局管理器总结
- linux遇到的问题及解决方法
- Ubuntu中apt-get、apt-cache相关命令总结
- Xcode6 用xib文件 创建窗口
- WPF TextBox重写 支持选择输入格式
- Spring注解注入
- iOS--坐标变换Quartz 2D中的CGContextTranslateCTM、CGContextScaleCTM、CGContextRotateCTM、CGContextConcatCTM等
- linux 冒号:的用途
- 回首2014
- Android Scrollbar 位置设置
- Golang适合高并发场景的原因分析
- Memcached深度分析