Adding App Behavior

Switch back to Xcode. Next, you’ll see how to add some real functionality to your app. First, you’ll need to set up the user interface, so make sure the storyboard is open. Then double-click the Hello World label and change it to Please enter your name. Drag a Text Field (scroll or search for it in the Object Library) onto the canvas and place it below the label. Then drag a button below the text field. Double-click the button and change its text to Tap Here! Finally, add a label below the button. Make the label as wide as the width of the screen, delete its text, and specify its content to be centered and blue.

Select the text field and look in the Attributes Inspector at some of the settings available. Change the Capitalization ...

Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.