IOS開發(fā)框架:關(guān)于Core Plot SDK用法
IOS開發(fā)框架Core Plot SDK的用法是本文要介紹的內(nèi)容,通過前一篇博文 Core Plot開源框架使用的學(xué)習(xí),我們已經(jīng)了解Core Plot框架,具體了解來看本文詳細(xì)內(nèi)容詳解。
如果使用了Core Plot標(biāo)準(zhǔn)Mac安裝包進(jìn)行安裝,使用起來有一些變化。其實(shí),如果你注意到安裝器的最后一個(gè)界面,這里已經(jīng)有一個(gè)如何使用的介紹了:
To add the Core Plot SDKs to an iOS Project:
1、Add to your project's .PCH file:
- #import <CorePlot/CorePlot.h>
2、Open Project -> Edit Project Settings and for All Configurations :
(1) Add to Additional SDKS :
- (System)
- /Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk
- (User)
- ${HOME}/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk
(2) Add to Other Linker Flags :
- -ObjC -all_load -lCorePlot
3、Add the QuartzCore framework to the project.
4、Add a CPGraph to your application.
但即使你step by step,也未必能編譯通過一個(gè)Core Plot應(yīng)用項(xiàng)目。
這是因?yàn)轫?xiàng)目Build Info中,C/C++ Compiler Version必須使用LLVM GCC 4.2,而不能使用GCC 4.2。
另外,如果你在源文件中 #import "CorePlot-CocoaTouch.h" ,將導(dǎo)致一個(gè)錯(cuò)誤。
因?yàn)镾DK的頭文件是CorePlot.h,而不是CorePlot-CocoaTouch.h。但我們已經(jīng)在.PCH文件中import過CorePlot.h了,并不需要在源文件中顯示地import。
小結(jié):IOS開發(fā)框架:關(guān)于Core Plot SDK用法的內(nèi)容介紹完了,希望通過本文的學(xué)習(xí)能對(duì)你有所幫助!




















