使用核心图时,应用程序崩溃 [英] Application crashes when working with core plot

查看:111
本文介绍了使用核心图时,应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Unknown class CPTGraphHostingView in Interface Builder file.
2012-01-09 16:09:34.242 ChartArea[2595:207] -[UIView setHostedGraph:]: unrecognized selector sent to instance 0x4c064f0
2012-01-09 16:09:34.245 ChartArea[2595:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setHostedGraph:]: unrecognized selector sent to instance 0x4c064f0'

这是我今天晚上遇到的错误。我在接口生成器中将CPTGraphHostingView的类名设置为我的uiview。

This is the error I am getting this evening. i am setting the class name of to CPTGraphHostingView to my uiview within interfacebuilder.

推荐答案

我遇到了同样的问题,这对我有用:

I had the same problem and this worked for me:


从Xcode的导航器面板中选择项目,然后
突出显示Build Settings选项卡。过滤设置或从此列表中找到其他
Linker Flags,然后将-ObjC -all_load添加到这些
设置

Select your project from the navigator panel in Xcode and then highlight the Build Settings tab. Filter the settings or locate ‘Other Linker Flags’ from this list and then add -ObjC -all_load to these settings

(从这里: http://www.johnwordsworth.com/2011/10/adding-charts-to-your-iphone-ipad-app-using-core-plot/

这篇关于使用核心图时,应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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