O'Reilly logo

The Complete Idiot's Guide® To iPad and iPhone App Development by Troy Brant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

iShockU App

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:
068
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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required