I have 3 view controllers
The first view controller is storing objects in an NSMutableArray from text fields, info entered by user. There are 4 fields which are being stored as one object in an NsMutableArray.
After storing the data in the array, it is then being stored in another array, array2, which is located in the 2nd view controller, the 2nd view controller has a UItableview and custom tableview cell. The array2 is displaying the information in the tableview cell.
I have an update btn which goes to the 3rd view controller and displays all the information in the tableview cell in 4 uitextfields just like in the 1st view controller. After I change the data, I am storing it again in another array, array3 which I want to pass back to the previous 2nd view controller to display the updated info in the table view cell.
Everything is working fine up till now, my question is, how can I pass the array3 back to the previous view controller to show the updated info? I am using delegates to pass data but I cannot seem to pass it back to the previous view controller. the app crashes and the error is "object cannot be nil"
I have checked various tutorials and questions but cannot find the answer. Please help.
Using delegates and arrays