【发布时间】:2014-05-06 07:51:34
【问题描述】:
我正在尝试使用 Core Plot 来绘制图形,但我的图形视图被实例化为 UIView 即使我在界面构建器中将其设置为 CPTGraphHostingView:
这是我的代码:
usersGraph = [[CPTXYGraph alloc] initWithFrame:usersGraphView.frame];
usersGraphView.hostedGraph = usersGraph;
为什么会这样?
【问题讨论】:
-
能否显示崩溃日志。
-
确实;说明为什么您认为它是
UIView而不是 Core Plot 自定义视图。 -
@Fogmeister @trojanfoe 因为它在崩溃日志(标题)中这么说。如果它是该类的实例,它会说 CPTGraphHostingView。这是输出:
2014-05-06 10:41:21.362 TanisalimAdmin[732:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setHostedGraph:]: unrecognized selector sent to instance 0x156d5930'
标签: ios objective-c xcode uiview core-plot