Changing the state of a switch widget via code

Hi there,

I want to change the state of some check boxes via code, but I cannot find the property in the widget that I have to update in order to do that.

Can anyone help me?

Its in the API docs:

  1. Start here: https://docs.coronalabs.com/api/

  2. Find newSwitch() link and click it

  3. Look for theĀ 

Return value

link at top of page, and click it.

That page will have the docs you need on it to set the state of a switch (checkbox in this case).

FYI: All API docs pages work this way.

Its in the API docs:

  1. Start here: https://docs.coronalabs.com/api/

  2. Find newSwitch() link and click it

  3. Look for theĀ 

Return value

link at top of page, and click it.

That page will have the docs you need on it to set the state of a switch (checkbox in this case).

FYI: All API docs pages work this way.