跳到主要内容

获取节点的矩形(:GetFrame)

函数

矩形数组 = 节点信息:GetFrame()

返回值

  • 矩形信息 数组型

说明

用于获取节点的矩形信息

示例

local node = require("nodeLua")

local nodeInfo = node.byPath('AWEMaskWindow/UITransitionView/UIDropShadowView/UILayoutContainerView/UITransitionView/UIViewControllerWrapperView/UILayoutContainerView/UINavigationTransitionView/UIViewControllerWrapperView/UIView/UIView/AWESearchCachalotView/CachalotCollectionView/CachalotCommonCollectionViewCell/UIView/SearchDynamicContainerView/BDXView/BDXLynxView/LynxView/LynxScrollView/UILynxView/UILynxView/UILynxView/LynxTextView/')
--查找路径


if (nodeInfo) then
print(nodeInfo[1]:GetFrame()) --打印当前节点 矩形位置
end