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