PadCodedocs

When a Value Changes

Runs actions each time a variable you pick changes, like the one a slider moves.

When a Value Changes added to a view, with its row open under All modifiers.

Group: Input and event · Works on: Every view

#Add it

Select the view, open the Inspector's Style tab, open All modifiers at the bottom and tap Add modifier. Search for “When a Value Changes” and tap it. Its row opens under All modifiers, with its settings.

It's the same as choosing When a Value Changes in the Actions tab: When the value in of changes, from typing, a slider, an action… See Triggers.

#Settings

SettingWhat it does
WatchThe variable to watch. Link one with ⚡︎.
Run at StartOn also runs the actions once when it first appears.
ActionThe actions to run. They can use the value before and after the change.

#Change, move or remove it

Tap the modifier's row under All modifiers to open or close its settings. Its ⋯ menu has Move Up, Move Down and Remove.

Order matters: modifiers apply top to bottom, so padding before a background makes the background bigger.

#See also