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. ...
Get iOS 17 Programming for Beginners - Eighth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.