2011-06-11 64 views
1

当我使用这条线画图形我的应用程序退出核心情节图形绘制问题iphone

CPGraphHostingView *hostingView = (CPGraphHostingView *)self.view; 
     hostingView.hostedGraph = barChart; 

错误

[UIView setHostedGraph:]: unrecognized selector sent to instance 0x595fb20 
2011-06-11 11:00:14.452 CGH[4909:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setHostedGraph:]: unrecognized selector sent to instance 0x595fb20' 

如何解决这个问题,我已经囊括了所有的lib正确

####更新

我再次使用它,但我得到这个错误,我已经连接类在笔尖文件

2011-09-28 14:53:06.791 Ihope_test_sql[9307:707] Unknown class CPTGraphHostingView in Interface Builder file. 
2011-09-28 14:53:06.795 Ihope_test_sql[9307:707] Unknown class CPTGraphHostingView in Interface Builder file. 
2011-09-28 14:53:06.797 Ihope_test_sql[9307:707] Unknown class CPTGraphHostingView in Interface Builder file. 
2011-09-28 14:53:06.800 Ihope_test_sql[9307:707] Unknown class CPTGraphHostingView in Interface Builder file. 
2011-09-28 14:53:06.847 Ihope_test_sql[9307:707] -[UIView setHostedGraph:]: unrecognized selector sent to instance 0x1cd920 
2011-09-28 14:53:06.875 Ihope_test_sql[9307:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setHostedGraph:]: unrecognized selector sent to instance 0x1cd920' 
*** Call stack at first throw: 
+0

好的我修好了,谢谢 – prajakta 2011-09-28 07:19:28

回答

1

看来你是在正常视图中托管图。你是否按照核心地块样本?尝试在interfaceBuilder中将UIView类更改为CPGraphHostingView。您不会碰到界面构建器的警告。

+0

我已经做了这个UIView * hostingView;还有什么改变? – prajakta 2011-06-11 03:36:22

+0

是的,你是对的非常感谢 – prajakta 2011-06-11 03:39:56

+0

其CPGraphHostingView或CPTGraphHostingView – kiran 2012-01-09 10:35:23