开发者

How do I use the Core Plot framework with Xcode 4?

How do I install the Core Plot framework into Xcode 4?

This older tutorial has instructions on how to install it for Xcode 3, but I could not find any similar instructions f开发者_如何学JAVAor Xcode 4. What do I need to do in order to use this framework with the newer Xcode?


I made one here that followed what I did:

http://recycled-parts.blogspot.com/2011/07/setting-up-coreplot-in-xcode-4.html

Hope it helps!


It appears that I was unable to set up core plot project for the reason that I had corrupt example project which code I was using.

This are the steps:

  • open a project
  • add quartzcore framework
  • add other linker flags: -ObjC -all_load
  • add CorePlot.xcodeproj to existing project (drag and drop)
  • add sample class (from examples folder, drag and drop)
  • drag coreplot framework from added CorePlot.xcodeproj to linked frameworks

in IB

  • drop object and associate it to sample class
  • drop custom view to window and associate it vith CPTLayerHostingView
  • connect object and custom view

And hat is that (may sound complicated, but can be done in under a minute)

Steps can be taken in any order, except last few.

Everithing is very similar to instructions at: http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application except the way it is done in xcode4 is actually easier.

Here are screenshoots that clarify the above steps: http://www.optimae.biz/data/stackoverflow/coreplot.pdf

Hope this will help someone.


0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜