触摸一次控件(:tap)
函数
obj:tap()
说明
该函数 执行一次节点触摸(节点的中心坐标),该函数只会在应用内部实现触摸事件 不会触发系统触摸事件.
此方法只能在 2.3.0以上版本中使用
示例
local node = nodeView.matchForMainWindow(function (info) --匹配节点信息 label==点赞 class==AWEFeedVideoButton 此函数返回节点对象数组 数组型
return info.label == "点赞" and info.class == "AWEFeedVideoButton"
end ,true) --第二个参数为 true 时 返回 对象数组
node[1]:tap() -- 模拟触摸控件