【问题标题】:Nibs view in other nibs subview with coreplot, cpgraph takes super view as its attribute其他笔尖子视图中的笔尖视图,带有coreplot,cpgraph将超级视图作为其属性
【发布时间】:2013-04-11 11:30:28
【问题描述】:

我将 A-viewcontrollers 视图加载到其他 B-viewcntrollers 子视图 (UIview),A 有带有 coreplot 的图形并初始化 CPTgraph。当'A'初始化它的所有属性时,比如:数组或标签是cptgraph实例的属性,所以它给了我错误。 谁能帮我解决这个问题。 提前致谢。

错误是:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString sizeWithTextStyle:]: unrecognized selector sent to instance 0x75b1e50'

【问题讨论】:

  • CPTGraph *graph = [[CPTXYGraph alloc] initWithFrame:self.hostView.bounds];在这里,'graph' 是'self' !!!

标签: iphone cocoa-touch uiviewcontroller core-plot loadnibnamed


【解决方案1】:

这是Core Plot添加的类别方法。确保您的项目同时使用 -ObjC 和 -all_load 链接器标志。请参阅http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications#Dependent_Project_Install 了解更多信息。

【讨论】:

    猜你喜欢
    • 2012-03-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多