PadCodedocs

Flip On/Off

Turns a true/false value to the opposite.

Category: Data

#When to use it

Use it to show or hide something with one tap, like details, a menu or a setting that's on or off.

#Example

A Show details button, When Tapped: Flip On/Off with State: showDetails. A view whose Show when is linked to showDetails appears and disappears with each tap.

#Good to know

  • The variable always ends up true or false. An empty variable counts as off, so the first flip turns it on.

#Add it

Select a view, open the Inspector's Actions tab, pick when it runs, tap Add action and choose Flip On/Off (under Data). Tap the step to open its settings.

#Settings

SettingWhat it doesKindDefault
StateA true/false value.VariableRequired

#See also