Core-Plot:在Interface Builder文件中的未知类CPLayerHostingView
使用核心图似乎不是一个简单的集成任务。标题路径已设置。在Interface-Builder中,我创建一个 CPLayerHostingView ,属于View Controller,由Interface Builder实例化。
Using core-plot does not seem to be an easy integration task. Header path are already setup. In Interface-Builder I create an CPLayerHostingView which belongs to a View Controller which is instantiated by Interface Builder.
当加载nib文件时,我收到以下消息:
When the nib file is loaded I get the message:
Unknown class CPLayerHostingView in Interface Builder file
有两个不同的版本的对象。一个用于Mac的仅称为CPLayerHostingView,一个用于iPhone的仅称为CPGraphHostingView。
I found, that there are two different versions of that object. One for Mac-Only called "CPLayerHostingView", one for iPhone only called "CPGraphHostingView".
如果按照 http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application 如果构建一个iPhone应用程序,你将使用以下行:
If following the poplular example at http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application you would use the following lines, if building an iPhone-App:
CPGraphHostingView *graphView = (CPGraphHostingView*)self.view;
graphView.hostedGraph = graph;