繁体   English   中英

iphone中的核心plot图形绘制问题

[英]core plot graph draw issue in 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'

如何解决此问题,我已正确包含所有库

#### 更新

我再次使用它,但出现此错误,我已在 nib 文件中连接了 class

 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:

您似乎在普通视图中托管图表。 您是否遵循核心情节样本? 尝试在 interfaceBuilder 中将 UIView Class 更改为 CPGraphHostingView。 您不会因为界面生成器的警告而崩溃。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM