Passing Data between View Controllers
In the previous chapter, you configured the JournalListViewController
class, the view controller for the Journal List screen, to display journal entries from a structure containing sample data in a table view.
In this chapter, you’ll learn how to pass data from one view controller to another. You’ll start by implementing a view controller for the Add New Journal Entry screen, then add code to pass data from the Add New Journal Entry screen to the Journal List screen. Next, you’ll learn how to remove journal entries while you’re on the Journal List screen. After that, you’ll learn about text field and text view delegate methods, and finally, you’ll pass data from the Journal List screen to the Journal Entry Detail screen.
By the end of this chapter, you’ll have learned how to pass data between view controllers and how to use text field and text view delegate methods. This will enable you...