A
A
artursk2015-12-29 13:56:10
iOS
artursk, 2015-12-29 13:56:10

How to pass data from the second controller to the first one?

Tell me... On the second controller, select several cells with the name and photo of the exercise from the table with a checkmarker, save it through an alert and transfer everything to the first controller into one cell, upon entering which the selected exercises are displayed. The names of the exercises and photos are built in, we create only the name of the workout that is displayed on the first controller in the title of the cell. How is it possible to transfer three parameters from the second controller (workout name, exercise name, photo) to the first controller. I save the name of the workout and transfer it using Nsuserdefaults, is it possible to transfer the parameters that are already registered in the application in the same way to save the selected exercises in one list, or are other methods required?9b5d3d204bf64ec0934717b1d735dacc.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2015-12-29
@koyard

Don't store data in Nsuserdefaults, use Core Data framework. As far as I understand it is perfect for you.
As for the transfer of data between controllers, see the Delegation section in the documentation .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question