iOS 使用core plot步骤:
iOS、MacOS没有画图表的标准控件,大伙一般都是core plot这个强大开源库。import步骤:
1、download core plot 源代码:https://code.google.com/p/core-plot/downloads/list
2、using core plot in your own project 有两种方法,一是把core plot当作sub project 加入到你自己的project,二是把core plot生成的静态库libCorePlot-CocoaTouch.a 加到你的project。具体方法请参考:https://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications 我用的是第二种方法。第二种方法有个关键的步骤是第三点:
“3. Open your apps Target Build Settings, and for Other Linker Flags include this:
-ObjC“
3、以上两步完成,就可以成功使用core plot了。
注意:
CPTGraphHostingView需要与一个xib view绑定
相关的文章:
http://www.e-string.com/content/simple-graph-using-core-plot
https://decibel.ni.com/content/docs/DOC-12836
http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application