在ios上animation在模拟和真机上表现区别很大
const animation = wx.createAnimation({
duration: 1000,
timingFunction: ‘ease-in-out’
});
this.animation = animation;
animation.rotate(180).step();
this.setData({
animationIcon: animation.export()
})
var n = 0;
setInterval(function() {
n = n + 1;
this.animation.rotate(180 * (n + 1)).step()
this.setData({
animationIcon: this.animation.export()
})
}.bind(this), 3000)
我就是想做个3秒旋转一圈的沙漏动画,在模拟上是正常的,3秒会转180°,但是在真机上是一次转好多圈