自定义 CPTPlotDataSource 在自我调用时未被调用

Custom CPTPlotDataSource not being called when self was

如果在 MasterViewController 对象(非常简单的绘制图表的应用程序中唯一的 UIViewController)上实现 CPTPlotDataSource,然后使用

在 CPTScatterPlot 上设置数据源
line.dataSource = self

我的应用程序完全按预期工作,但如果我创建一个小的 class 并使其扩展 CPTPlotDataSource 然后使用

设置数据源
line.dataSource = NewImplementation()

那么

func numberOfRecordsForPlot(plot: CPTPlot!) -> UInt 
func doubleForPlot(plot: CPTPlot!, field: UInt, recordIndex: UInt) -> Double 

其中仅有的两个函数被调用过。

dataSource 很弱,分配后正在释放