18
Getting Started with JSON Files
In the previous chapter, you modified the Add Journal Entry screen so that the user can add their current location to a new journal entry, and configured the Map screen to display a region centered on your current location as well as pins representing the location where the journal entries are made. However, since the JournalListViewController class and the MapViewController class are using separate instances of the SampleJournalEntryData structure, newly added journal entries do not appear on the Map screen as pins. Also, all the journal entries are lost when you quit the app.
In this chapter, you will create a singleton, SharedData, that will provide journal entry data to both the Journal List and Map screens. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access