菜鸟: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、
    CGrect screenBounds = [ [UIScreen mainScreen]bounds];//返回的是带有状态栏的Rect  CGRect viewBounds = [ [UIScreen mainScreen]applicationFrame];//不包含状态栏的Rect
5、
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,参考文献


原创粉丝点击