November 2018
Intermediate to advanced
404 pages
10h 16m
English
Next, add a new function to the delegate protocol to support editing an existing entry.
Add an additional function to delegate the Done Editing event to MainScreenViewController:
// Define the delegate protocol to inform Main Screen View Controllerprotocol EntryDetailsViewControllerDelegate: class { //... previously defined functions // Delegate Done Editing Event func entryDetailsViewController(_ controller: EntryDetailsViewController, didFinishEditing entry: JournalEntry)}
Implement the corresponding function in the MainScreenViewController class:
func entryDetailsViewController(_ controller: EntryDetailsViewController, didFinishEditing entry: JournalEntry) { updateEntry(entry: entry) dismiss(animated: ...
Read now
Unlock full access