Answer the question
In order to leave comments, you need to log in
How to transfer data between 2 remote VCs?
Hello! I need to transfer data between two VCs that are very distant from each other. I tried Notifications but nothing comes out, is there any local storage for any data. For example, in 1 VC I store data in storage and in another I take data from there. Is there such a thing? Or what else can be used?
Answer the question
In order to leave comments, you need to log in
Most likely you need to use either UserDefaults or a database . Depends on the data and task.
I'll add a little. It depends on how much you need to store this data and on their quantity. If there is a lot of data and they need to be protected constantly, as UserDefaults already said, the sqlite or plist database (essentially the same UserDefaults).
If it's just a one-time transfer of data, then you can delegate or singlton. But singlton is now being punched in the face in many organizations.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question