CPTPieChart *pieChart = [[CPTPieChart alloc] init];
pieChart.plotSpace.delegate = self;
pieChart.plotSpace.allowsUserInteraction=YES;
pieChart.labelOffset=-50;
pieChart.dataSource = self;
pieChart.delegate = self;
pieChart.pieRadius = (self.hostView.bounds.size.height * 0.4) / 2;
pieChart.pieInnerRadius=pieChart.pieRadius/2;
pieChart.identifier = graph.title;
pieChart.startAngle = M_PI_4;
pieChart.sliceDirection = CPTPieDirectionClockwise;
启用了我的委托被调用的绘图空间中的用户交互,但饼图没有缩放和平移。 参考图
CPTGraph *graph = self.hostView.hostedGraph;
self.hostView.allowPinchScaling=YES;