菜鸟:IOS 学习:磨难记 (第六天)
来源:互联网 发布:阿里云盒子怎么刷机 编辑:程序博客网 时间:2024/06/05 00:17
一、XCODE4.5 系统模板介绍
Xcode4时代 Xcode4.2新模板
Navigation-based Application ------->Master-Detail Application => iphone
Splite View-based Application ------->Master-Detail Application => ipad
OpenGL ES Application --------------->OpenGL Game
Tab Bar Application --------------->Tabbed Application
Utility Application --------------->Utility Application
View-based Application --------------->Single View Application
Window-based Application------------>Empty Application
1、Single View Application 单视图模板
2、Master-Detail Application
iPhone的Navigation(导航模式)和为iPad的Split(分割模式)
3、OpenGL Game 3D游戏或者图形
4、Page-Based Application 翻页效果
5、Tabbed Application 标签栏应用程序
6、Empty Application 基于窗口的应用程序
7、Utility Application 工具应用程序
二 图表DEMO开发
1、修改类名的好办法,双击选中某个类变量名,右击选择Refactor,可以进行Rename和重构的操作
2、
@dynamic 意思是由开发人员提供相应的代码:对于只读属性需要提供 setter,对于读写属性需要提供 setter 和 getter。
@synthesize 意思是,除非开发人员已经做了,否则由编译器生成相应的代码,以满足属性声明。
3、创建导航控制器
[UINavigationController alloc] initWithRootViewController:[[ChartViewController alloc] init] 初始化化
4、
CGRectMake(x,y ,width, height); //返回一个矩形,在指定的坐标和大小值。
6、
[[[UITableViewCell alloc] initWithStyle:UITableViewCell StyleDefaultreuseIdentifier:SimpleTableIdentifier] autorelease]; 表格单元初始化
7、
UITableViewCellAccessoryDetailDisclosureButton //行的右边的箭头
8、
[self.navigationController pushViewController:detailVC animated:YES]; //显示新的视图
9、
UIWebView 用于读去网络数据
[[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 770, 400)]; //初始化
10、
[WebView setUserInteractionEnabled:YES];//是否启用
WebView.scalesPageToFit =YES; //是否缩放
[WebView setBackgroundColor:[UIColor clearColor]]; //设置背景色为透明
[WebView setOpaque:NO];//使网页透明
11、
NSString *path = [[NSBundle mainBundle] pathForResource:@"1.html" ofType:nil]; //初始化资源对象
[WebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath: path]]]; //加载数据
fileURLWithPath 初始化指定文件的NSURL对象,
12、
Xcode4时代 Xcode4.2新模板
Navigation-based Application ------->Master-Detail Application => iphone
Splite View-based Application ------->Master-Detail Application => ipad
OpenGL ES Application --------------->OpenGL Game
Tab Bar Application --------------->Tabbed Application
Utility Application --------------->Utility Application
View-based Application --------------->Single View Application
Window-based Application------------>Empty Application
1、Single View Application 单视图模板
2、Master-Detail Application
iPhone的Navigation(导航模式)和为iPad的Split(分割模式)
3、OpenGL Game 3D游戏或者图形
4、Page-Based Application 翻页效果
5、Tabbed Application 标签栏应用程序
6、Empty Application 基于窗口的应用程序
7、Utility Application 工具应用程序
二 图表DEMO开发
1、修改类名的好办法,双击选中某个类变量名,右击选择Refactor,可以进行Rename和重构的操作
2、
@dynamic 意思是由开发人员提供相应的代码:对于只读属性需要提供 setter,对于读写属性需要提供 setter 和 getter。
@synthesize 意思是,除非开发人员已经做了,否则由编译器生成相应的代码,以满足属性声明。
3、创建导航控制器
[UINavigationController alloc] initWithRootViewController:[[ChartViewController alloc] init] 初始化化
4、
- CGrect screenBounds = [ [UIScreen mainScreen]bounds];//返回的是带有状态栏的Rect CGRect viewBounds = [ [UIScreen mainScreen]applicationFrame];//不包含状态栏的Rect
CGRectMake(x,y ,width, height); //返回一个矩形,在指定的坐标和大小值。
6、
[[[UITableViewCell alloc] initWithStyle:UITableViewCell StyleDefaultreuseIdentifier:SimpleTableIdentifier] autorelease]; 表格单元初始化
7、
UITableViewCellAccessoryDetailDisclosureButton //行的右边的箭头
8、
[self.navigationController pushViewController:detailVC animated:YES]; //显示新的视图
9、
UIWebView 用于读去网络数据
[[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 770, 400)]; //初始化
10、
[WebView setUserInteractionEnabled:YES];//是否启用
WebView.scalesPageToFit =YES; //是否缩放
[WebView setBackgroundColor:[UIColor clearColor]]; //设置背景色为透明
[WebView setOpaque:NO];//使网页透明
11、
NSString *path = [[NSBundle mainBundle] pathForResource:@"1.html" ofType:nil]; //初始化资源对象
[WebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath: path]]]; //加载数据
fileURLWithPath 初始化指定文件的NSURL对象,
12、
UIActivityIndicatorView可以用于显示某项工作在进行中,比如加载进度
三 :IOS图形报表DEMO
开源组件iChartjs基于HTML5,参考文献
- 菜鸟:IOS 学习:磨难记 (第六天)
- 菜鸟:IOS 学习:磨难记 (第二天)
- 菜鸟:IOS 学习:磨难记 (第四天)
- 菜鸟:IOS 学习:磨难记(第一天)
- 菜鸟:IOS 学习:磨难记 (第三天)
- 菜鸟:IOS 学习:磨难记 (第五天)
- 菜鸟:IOS 学习:磨难记 (第七天)
- 学习iOS的第六天
- Python菜鸟学习第六课
- ios学习第六天(一)自定义UIView上
- ios学习第六天(二)自定义UIView中
- ios学习第六天(三)自定义UIView下
- ios学习第六天(四)美丽的自定义View
- iOS-学习笔记-UI-第六天
- iOS 菜鸟逆向学习 (一)
- 【不抱怨21天】实践手册(第十二天)-磨难
- C++菜鸟常见错误整理(第六天)
- IOS菜鸟学习之路
- struts2学习1---2012.1.20
- 相信未来 很喜欢的诗
- VS2008下直接安装使用Boost库1.46.1版本
- SDK Manager无法启动、一闪而过问题的解决
- windows 和 linux 清理 临时 文件 的脚本
- 菜鸟:IOS 学习:磨难记 (第六天)
- 关于大脑的一些常识,学习中请注意灵活运用
- LRJ生成可重复的排列
- fckeditor零碎要点---3.<FCK:editor instanceName="myeditor" value="李德伟欢迎您" height="400"></FCK:editor
- Hoj 2991 Find the Point
- 第十二节 html5学习——web worker
- 利用awk统计Linux下最常用的20条命令的shell
- 最短路
- arm介绍