Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 使用core plot时应用程序崩溃_Iphone_Core Plot - Fatal编程技术网

Iphone 使用core plot时应用程序崩溃

Iphone 使用core plot时应用程序崩溃,iphone,core-plot,Iphone,Core Plot,这就是我今晚遇到的错误。我正在interfacebuilder中将的类名称设置为CPTGraphHostingView到我的uiview。我遇到了同样的问题,这对我很有效: 从Xcode中的navigator面板中选择您的项目,然后 突出显示“生成设置”选项卡。筛选设置或查找“其他” 然后将-ObjC-all_load添加到这些 背景 (此处:)您在ViewController中的视图可能不是CPTGraphHostingView的类型,因此该视图无法强制转换 通过创建CPTGraphHosti

这就是我今晚遇到的错误。我正在interfacebuilder中将的类名称设置为CPTGraphHostingView到我的uiview。

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

从Xcode中的navigator面板中选择您的项目,然后 突出显示“生成设置”选项卡。筛选设置或查找“其他” 然后将-ObjC-all_load添加到这些 背景


(此处:)

您在ViewController中的视图可能不是CPTGraphHostingView的类型,因此该视图无法强制转换

通过创建CPTGraphHostingView的确切实例,然后将其添加到ViewController的视图中,可以修复此问题

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*hostingView=(CPTGraphHostingView*)self.view中尝试此功能;CPTGraphHostingView*hostingView=(CPTGraphHostingView*)self.view;这就是我在代码中使用的!这是关于界面生成器的,它没有阅读。说“未知类”是个问题,甚至我在界面生成器中为UIView提供了适当的类,以获得“RTFM”的条形图典型情况。我想知道那些链接器标志是用来做什么的……CorePlot的文档实际上是pits……啊,好吧。@kiran,这个答案应该得到批准。
CGRect frame = [[self view] bounds];

CPTGraphHostingView* graphHost = [[CPTGraphHostingView alloc] initWithFrame:frame];

[[self view] addSubview: graphHost];