Main Content


Display button widget on device screen

  • Button block

Simulink Support Package for Apple iOS Devices / User Interface


The Button block displays a button widget on the deployed ios app running on the device screen. The button has two states: pressed and not-pressed. Tapping the button switches the state of the button.

The Button block outputs a Boolean value. If the button state is Pressed, the block outputs 1. If the button state is Not Pressed, the block outputs 0. The Button state parameter sets the button state when the deployed ios app starts.


During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.



expand all

Button state output, returned as a Boolean scalar.

Data Types: Boolean


expand all

Select the initial state of the button when the deployed ios app starts.

Specify a discrete time interval, in seconds, at which the block reads the button state and outputs the data.

Version History

Introduced in R2015a

See Also