Skip to content

SwitchDemo.llua

xu.jingyu edited this page Aug 11, 2020 · 1 revision

Switch

copy下面代码,运行试试

switch = Switch()
switch:width(100):height(80):marginLeft(100):marginTop(100)

switch:setSwitchChangedCallback(function(isOn)
    print("switch changed -----", isOn)
    print("switch ----- ", switch:on())
end)

window:addView(switch)
Clone this wiki locally