Glist代码控制下拉操作(用代码模拟下拉操作,ui显示被下拉)

Glist代码控制下拉操作(用代码模拟下拉操作,ui显示被下拉)

public AddItem(){
        this.IsAdd = false;
        this.ItemCount ++;
        this._ui.m_ContentBox.numItems  = this.ItemCount;
        if (this.ItemCount > 0){
            this._ui.m_ContentBox.scrollToView(this.ItemCount-1,true);
        }else{
            // 需要模拟下拉
        }
    }
 
已邀请:

zld126126

赞同来自:

补充:

let contentHeight = this._ui.m_ContentBox.scrollPane.contentHeight;
        let viewHeight = this._ui.m_ContentBox.scrollPane.viewHeight;
        if (contentHeight > viewHeight){
            console.log("内容高度应景超出视口高度");
            // todo 模拟上拉或下拉手势,让视窗自动弹回
        }
 

zld126126

赞同来自:

1.gif

如上图的鼠标造成的Glist效果

谷主

赞同来自:

看demo pulltorefresh

要回复问题请先登录注册