在ios上animation在模拟和真机上表现区别很大
发布于 5 年前 作者 schen 13507 次浏览 来自 问答

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°,但是在真机上是一次转好多圈

1 回复

能麻烦制作个代码片段吗?光看这段代码好像没什么问题呢

https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部