此文主要讲iOS项目中如何引用Core-Plot框架
1、下载Core-Plot,解压并拷贝里面的
framework
文件夹到你的项目中(假设你的项目为testCorePlot
),最好重命名为CorePlotFramework
1
2、把
CorePlotFramework
中的CorePlot.xcodeproj
拖到项目中
2
3、选中
testCorePlot
,到Build Phases
中,添加CorePlot-CocoaTouch
到target dependencies
,再在Link Binary With Libraries
中添加libCorePlot-CocoaTouch.a
和Accelerate.framework
3
4、到
Build settings
中, 找到Header search paths
, 添加$(SRCROOT)/CoreplotFramework
, 后面选择recursive
4
5、还是在
build settings
中,在Other Linker Flags
中添加-ObjC
5
6、在项目中引入
#import "CorePlot-CocoaTouch.h"
,正常编译就可以使用了。