Exercises

1. Make sure the camera button shows up only on devices that support a camera.

2. Make sure the camera button is shown and hidden appropriately when the user changes between edit and view modes.

3. Implement a long-press recognizer for the cell phone field, but instead of calling the number, send a message.

4. Create a new Single-View project and use the accelerometer data to create a simple game where the player gets points by tapping a button that can be moved around the screen by tilting the device.

5. Add three sliders and use them to display the accelerometer data in all three dimensions in real-time.

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.