0
我有一個餅圖工作使用數據源和委託方法的核心圖,但我現在試圖使用綁定和運行到一些問題。可可綁定和核心圖
我使用下面的代碼綁定到arraycontroller:
[graph addPlot:pieChart];
// add bindings
NSLog(@"The arranged objects are: %@", [[[self sectorAllocation] arrangedObjects] valueForKey:@"sectorPercentage"]);
[pieChart bind:CPTPieChartBindingPieSliceWidthValues toObject:[self
sectorAllocation] withKeyPath:@"arrangedObjects.sectorPercentage"
options:nil];
//Set the sorting
[[self sectorAllocation] setSortDescriptors:[NSArray arrayWithObject:
[NSSortDescriptor sortDescriptorWithKey:@"sectorPercentage" ascending:YES]]];
它似乎越來越掛了updateNormalizedData功能。根據我的NSlog聲明,我的arraycontroller正在返回適當的值,所以我不知道我在做什麼錯誤...任何建議?
我之前使用的是二進制文件,所以不得不改變爲依賴方法...花了一點時間來設置,但一切都在工作,謝謝。 – Cory