您的位置:首页 > 移动开发 > IOS开发

菜鸟: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,参考文献

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: