Database Reference
In-Depth Information
Figure 45—The recipe detail view
A1.4 The Edit Workflow
The complexity of our application really lives in the edit workflow shown in
Figure 46, Starting the edit workflow , on page 215 . It is in this workflow that
we edit, delete, and change data objects.
The bulk of the complexity of the edit workflow is in the very first UIViewController .
To begin with, this UITableViewController uses static cells, as opposed to prototype
cells. In this design, we have a known quantity of cells, and each cell displays
a different piece of information.
By utilizing static cells, we do a significant portion of the work of the edit
workflow directly in the storyboard. We avoid handling a large amount of
complexity in our application when a user selects a cell. In other words,
instead of having to figure out which cell was selected, determine the view
controller to build, populate that view controller, present it, and so on, we
can have the storyboard do the bulk of that work for us. Each cell in this
UITableViewController has a segue to another UIViewController . Each of those segues
is named, and we can therefore do away with a large portion of code. Our
UITableViewController subclass needs to look only at the identifier of the segue
and inject the right dependencies.
 
 
 
Search WWH ::




Custom Search