Core-Plot:在Interface Builder文件中的未知类CPLayerHostingView [英] Core-Plot: Unknown class CPLayerHostingView in Interface Builder file

查看:163
本文介绍了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;

这篇关于Core-Plot:在Interface Builder文件中的未知类CPLayerHostingView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆