CorePlot使用的配置步骤

来源:互联网 发布:淘宝修改差评 编辑:程序博客网 时间:2024/06/05 05:14

很简单,基本上两分钟搞定。

直接按照官网wikii的配置成功,但略有变化。

官网的静态库安装方法:


Static Library Install

You can also just copy the Core Plot library directly into your project in binary form.

1. Copy the CorePlotHeaders directory to your Xcode project

//翻译:拷贝CorePlotHeaders (路径:CorePlot_1.0/Binaries/iOS)文件夹到你的工程。(我喜欢先拷贝文件到项目文件夹下,然后用add file to your project。。。)

2. Copy the Core Plot library to your Xcode project.

//拷贝libCorePlot-CocoaTouch.a到工程。  拷贝方法同上,想用CorePlot的同学应该都懂。

3. Open your apps Target Build Settings, and for Other Linker Flags include this:

-ObjC

//打开应用设置->target->build settings  在links里找到 Other Linker Flags  写上-ObjC

(-all_load used to be required as a linker flag, but this is no longer needed in Xcode 4.2)

//xcode4.2以及更新版本 请无视上面这句。

4. Add the QuartzCore framework to the project.

//这个应该会把。

5. Change your C/C++ Compiler in the project build settings to LLVM GCC 4.2 or LLVM 1.6.

//这个不管它,一般来说我们用最新的编译器。别看gcc 4.2的版本号4.2这么大,其实弱爆了,被llvm命名开头的编译器里完爆。


//解释:1 上面涉及的文件都在下载的包里能找到,下载地址:http://code.google.com/p/core-plot/downloads/list   下那个:CorePlot_1.0.zip  包里什么都有,找到ios目录,就是那个里面只有.h文件和一个.a文件的目录了,我们使用只要用这两个。当然如果是很有公德心的人也可以自己去研究source目录!


最后一步我没有做,因为gcc 4.2太落后了,用的是xcode默认的Apple LLVM compiler 3.0,当然xcode越新越好,编译器也是。    但是增加一个步骤 6.添加CoreGraphics.framework包到工程里,如果你工程里本来就有就不用增加了。

接下来准备总结下:

CorePlot坐标设计。

CorePlot饼状图。

CorePlot柱状图。

有空就写上面三篇,欢迎有研究CorePlot的同学一起讨论。