My app does a lot of math. In order to display all the steps, I need another ViewController, but I also need the same data (of course). I've found a lot of tutorials on internet, but they're too complex to do as I have a lot of different inputs. Usually they had only 1 input, what makes the task simple. Is there any way to transfer the data in a simple way?
Asked
Active
Viewed 53 times
0
-
you can easily pass data between viewControllers . are you sure you are talking about view controller? – Jack.Right May 13 '16 at 12:59
2 Answers
0
It depends on what you have to pass through your controller.
What you can do is create an object that stores all what you want to pass to your other controller then use a segue and the prepareForSegue
and performSegueWithIdentifier
to load your data in your next controller.

Chajmz
- 729
- 5
- 11
0
There are several ways to do it.
- Delegate
- Properties
- Singleton Class
- NSUserdefaults
You can choose as per your requirement. as you are asking simple I will suggest you a vary simple way from it is NSUserdefaluts
If you need a example code then add comment below, I will provide you example for this as well ;)

NSAnant
- 816
- 8
- 18