iShockU is a simple app. The interface needs just two elements: a button and a label to output some text. When the app first opens, the label displays the message, “Don’t touch this button or else …”. When the button is tapped, the message will change to “Zap!” When the user releases the button, the label will revert to the original “Don’t touch” text. These two states are displayed in the following figure:
iShockU before the button is pressed (on the left) and after (on the right).
There are two main tasks in building this app: laying out the interface and programming what happens when the button is tapped. The following strategy ...