【发布时间】:2015-04-30 05:23:38
【问题描述】:
我在我的xcode 项目中实现了corePlot。我使用饼图,并尝试像这样对其进行动画处理:
[CPTAnimation animate:pieChart property:@"endAngle" from:pieChart.startAngle + M_PI * 2 to:pieChart.startAngle duration:2.0];
它的动画效果很好,但问题是,一旦应该显示图表,(在动画之前)图表会显示片刻,然后消失并开始动画。
我怎样才能让它在不提前出现的情况下启动动画?
更新
这里是完整的代码:
CPTGraph *graph = self.hostView.hostedGraph;
self.pieChart = [[CPTPieChart alloc] init];
self.pieChart.dataSource = self;
self.pieChart.delegate = self;
self.pieChart.pieRadius = (self.hostView.bounds.size.height * 0.7) / 2;
self.pieChart.identifier = graph.title;
self.pieChart.endAngle = self.pieChart.startAngle;
self.pieChart.pieInnerRadius = self.pieChart.pieRadius / 2;
【问题讨论】:
标签: ios objective-c animation core-plot