-
Notifications
You must be signed in to change notification settings - Fork 207
SwitchDemo.lua
xu_whale edited this page Dec 16, 2019
·
6 revisions
copy下面代码,运行试试
switch = Switch()
switch:frame(Rect(100, 100, 100, 80))
switch:bgColor(Color(223, 213, 12, 1))
switch:setSwitchChangedCallback(function(isOn)
print("switch changed -----", isOn)
print("switch ----- ", switch:on())
end)
window:addView(switch)