Search code examples
iosswiftdata-persistence

Persistent data at runtime


Is there a way to persist data in a view during Runtime only, as user navigates between views.

ie user answers a question in a view sets a bool flag so if user navigates back to question view the question is already answered . When user quits app the bool flag should not persist.

Hope that makes sense. Thanks in advance


Solution

  • Not a perfect solution but your application is singleton and storing data there is one option. However, I would seriously consider redesigning your app.