Exercises

1. Split the name field into first and last name. Then make sure both first and last names show up when tapping the button.

2. Change the functionality of the showOutput method so that if no text has been entered, the output changes to Hello World!

3. Explore the properties for the text fields, buttons, and labels within Xcode. Change the label to green and bold text. Change the border style for the text field, and add a clear button.

4. Add a new button to the app, with a method that will change the lblOutput text to Hello World!

5. Rotate the simulator while running the app.

6. Run the app in the iPad simulator. Then change the Devices setting to Universal and run again in the iPad simulator.

7. Have the keyboard dismiss when the ...

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.