O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

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

Activating the Interface

The next chapter is dedicated to implementing most of the functionality of saving data from the Contacts screen, but for now, we will implement the capability to switch between view and edit modes. The code for this is quite simple, but somewhat tedious.

The edit mode is controlled by the Segmented Control. When the user changes to View, all the controls will be disabled so they can’t be edited. And when the user changes back again, they will be reactivated.

1. Open the storyboard in Assistant Editor mode and control-drag from the Segmented Control in the Contact View Controller to the @interface section of the LMAContactsController.h file.

2. Add an action named changeEditMode: (see Figure 10.21). Click Connect. The ...

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