小编Jia*_*jun的帖子

我想在本机反应中更改滚动视图滚动速度

现在我用interval来实现,但是很不连贯。如果我能改变方法 ( scroll) 的速度,那就太好了。

this.interval = setInterval(()=>{
    if(!_scroll){
        _this.interval && clearInterval(_this.interval);
    }
    if(totalWide+ScreenWidth >= width ){
        _scroll.scrollWithoutAnimationTo();
        totalWide=0;
        i=0;
    }else{
        _scroll.scrollTo({x:eachWide*i,animate:true});
        totalWide = totalWide + eachWide;
        i= i+1;
    }
},250) 
Run Code Online (Sandbox Code Playgroud)

performance scrollview react-native

3
推荐指数
1
解决办法
7790
查看次数

标签 统计

performance ×1

react-native ×1

scrollview ×1