Google开源库corePlot的使用

参考文档:http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application

 

第一步:下载corePlot:

1 下载 Mercurial: http://mercurial.selenic.com/wiki/

2 在Mac的Terminal输入:hg clone http://core-plot.googlecode.com/hg/ core-plot。把corePlot下载在本地user文件夹中。

 

第二步:关联corePlot到项目中:

1 把 corePlot中的CorePlot-CocoaTouch.xcodeproj这个项目工程Add到自己的工程中,这里仅引用即可。

2 把 CorePlot-CocoaTouch.xcodeproj子目录的libCorePlot-CocoaTouch.a文件加入到自己工程的target中。

3 转到target的info页面。在general添加direct dependencies:CorePlot-CocoaTouch

4 转到项目的在Build选项页,如下图设置:(注:Build选项卡为“项目工程”的Info页的,在Build选项页,选择All Configurations)

(1)  ( FYI:Recursive is checked!)

(2)

 

 

第三步,在项目中使用CorePlot:

1 添加已有FrameWork:QuartzCore到工程中。(因为CorePlot是建立在Core Animation上的)

2 添加CPPlotDataSource协议到ViewController中,和添加CPXYGraph对象……(开始实现自己的功能吧)

 

大家可以看链接中的E文,了解更详细的内容。

附CorePlot的DOC:http://code.google.com/p/core-plot/

 

 

posted @ 2010-11-01 11:44  simalone  阅读(1990)  评论(0编辑  收藏  举报