import {findNodeHandle, UIManager} from 'react-native'
layout(ref) {
const handle = findNodeHandle(ref);
return new Promise((resolve) => {
UIManager.measure(handle, (x, y, width, height, pageX, pageY) => {
resolve({
x,
y,
width,
height,
pageX,
pageY
});
});
});
}
手机扫一扫
移动阅读更方便
你可能感兴趣的文章