首页 技术 正文
技术 2022年11月6日
0 收藏 426 点赞 428 浏览 2145 个字

先来看一下官方的说法,贴内容(https://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications)

Dependent Project Install

Because frameworks cannot be used in Cocoa Touch applications in the same way as on the Mac, the means of including Core Plot within an iPhone application are slightly different.

First, drag the CorePlot-CocoaTouch.xcodeproj file into your iPhone application’s Xcode project. Show the project navigator in the left-hand list and click on your project.

Select your application target from under the “Targets” source list that appears. Click on the “Build Phases” tab and expand the “Target Dependencies” group. Click on the plus button, select the CorePlot-CocoaTouch library, and click Add. This should ensure that the Core Plot library will be built with your application.

Core Plot is built as a static library for iPhone, so you’ll need to drag the libCorePlot-CocoaTouch.a static library from under the CorePlot-CocoaTouch.xcodeproj group to the “Link Binaries With Libraries” group within the application target’s “Build Phases” group you were just in.

You’ll also need to point to the right header location. Under your Build settings, set the Header Search Paths to the relative path from your application to the framework/ subdirectory within the Core Plot source tree. Make sure to make this header search path recursive. You need to add -ObjC to Other Linker Flags as well (as of Xcode 4.2, -all_load does not seem to be needed, but it may be required for older Xcode versions).

Core Plot is based on Core Animation, so if you haven’t already, add the QuartzCore framework to your application project. Beginning with release 2.0, the Accelerate framework is also required.

Finally, you should be able to import all of the Core Plot classes and data types by inserting the following line in the appropriate source files within your project:

#import "CorePlot-CocoaTouch.h"

You can see some examples of plot types and features we might want to have in Core Plot at PlotExamples.

细细的看了一遍感觉还是挺简单的,那么我们来写一下中文的版本:

1.找目标,先去github上面去找到这个工程,然后把这个工程去clone下来

2.拷贝,找到CorePlot-CocoaTouch.xcodeproj,然后把这个玩意整个拖到你得工程里面,你回看到包括这个工程的目录都会被拖进来

3.加库,在自己的工程的target里面Build Phases添加把静态库libCorePlot-CocoaTouch.a添加进工程

4.配置路径,你需要在Header Search Paths中去配置framework文件的路径(就是coreplot的路径)

5.把工程里面Other Linker Flags设置为-ObjC

6.如果工厂里面没有QuartzCore framework那就要加进去,现在最新的coreplot是2.0以后了,就需要添加Accelerate framework

7.#import “CorePlot-CocoaTouch.h”  如果编译不报错,那么恭喜你,你可以开始使用CorePlot的强大功能了

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,492
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,907
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,740
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,495
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,132
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,295