跳到主要内容

获取节点的父类名(:GetSuperClassName)

函数

父类名 = 节点信息:GetSuperClassName()

返回值

  • 父类名 文本型

说明

用于获取当前节点信息的父类名

示例

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]:GetSuperClassName()) --打印当前节点 父类名
end