I am creating an application in which I have to pass data from 16 UITextFields, store them in an array in form of a class object and display all the objects from that array in other viewController.
How can you pass data from one viewController to the another?
Suppose you have two view controllers named viewController1 and viewController2. Have an instance variable textData of NSArray in viewcontroller2. Make sure you add @property and @synthesize to the variable. Allocate the array in the init method of viewController2 and you can pass the array from the first viewController to the second by
viewController2.textData = viewController1.textArray;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With