跳到主要内容

枚举值集合(EnumValues)

方法(Methods)

__len

获取枚举值数量。

local vmi = context:viewModel()
if vmi then
local textAlignment = vmi:getEnum('textAlignment')

if textAlignment then
local values = textAlignment:values()
print('count: ', #values)
end
end
看完还有疑问?进群交流下!
与众多 Rive 创作者、开发者一起交流探讨与答疑解惑。
加入交流群