菜鸟:IOS 学习:磨难记 (第六天)
2013-01-20 20:13
357 查看
一、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、
CGrect screenBounds = [ [UIScreen mainScreen]bounds];//返回的是带有状态栏的Rect CGRect viewBounds = [ [UIScreen mainScreen]applicationFrame];//不包含状态栏的Rect5、
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,参考文献
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];//不包含状态栏的Rect5、
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 学习小菜鸟之蓝牙corebluetooth
- 菜鸟学习ios
- IOS开发---菜鸟学习之路--(四)-登陆界面
- 学习iOS的第六天
- IOS开发---菜鸟学习之路--(二十三)-直接利用键值对的方式来处理数据的感想
- 今天开通博客,记录我作为一个小菜鸟在iOS学习中的点点滴滴
- iOS菜鸟学习——去除UITableView中多余的separator
- iOS菜鸟成长笔记(3)——斯坦福公开课学习(1)
- iOS菜鸟学习——图片resize的实现
- IOS开发---菜鸟学习之路--(十五)-如何实现拍照功能
- IOS开发---菜鸟学习之路--(十六)-将Image转换为Base64
- IOS开发---菜鸟学习之路--(二十)-二维码扫描功能的实现
- iOS菜鸟成长笔记(3)——斯坦福公开课学习(1)
- IOS开发---菜鸟学习之路--(二十一)-利用正则表达式解析URL获取其中的参数