mc.offKeyboardHeightChange(function callback)
取消监听键盘高度变化事件
参数
参数 | 类型 | 默认值 | 必填 | 说明 |
---|---|---|---|---|
callback | Function | 是 | 需要取消监听的回调函数 |
示例代码:
const callback = function(res){
console.log(res.size.windowWidth, res.size.windowHeight)
}
//监听
mc.onKeyboardHeightChange(res => {
console.log(res.height)
})
//取消监听
mc.offKeyboardHeightChange(callback);