【问题标题】:How to animate bars of barchart-coreplot如何为 barchart-coreplot 的条形设置动画
【发布时间】:2012-03-02 20:21:12
【问题描述】:

我是 iphone 开发和 coreplot 的新手。 我想根据我已经完成的一些数据绘制条形图。 现在我想给情节条添加一些动画。这意味着图表中的条形应该在增长或缩小的效果中变长或缩短。

谁能帮帮我?

提前致谢。

【问题讨论】:

标签: iphone objective-c core-plot


【解决方案1】:

请参考以下帖子: How to access CALayer of individual bar in core-plot?

它与您尝试做的事情完全相同。

【讨论】:

    【解决方案2】:

    我不知道您可能使用的是什么类,但很可能它是 CA 层的子类。 检查此代码:

    CABasicAnimation *rotation = [CABasicAnimation animationWithKeyPath:@"transform"];
    CATransform3D transform = CATransform3DMakeRotation(DegreesToRadians(360), 0, 0, 1);
    rotation.toValue = [NSValue valueWithCATransform3D:transform];  
    rotation.duration = 10.0f;
    [pieChart addAnimation:rotation forKey:@"rotation"];
    

    How to animate the pie charts developed using core-plot library?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-27
      • 1970-01-01
      相关资源
      最近更新 更多