How can I bring a variable from a View controller to the back one? (i.e. from B view controller to A view controller?)
I have a switch value that i set on View controller B and I need to access this data also from the back view controller the A.
How can I bring a variable from a View controller to the back one? (i.e. from B view controller to A view controller?)
I have a switch value that i set on View controller B and I need to access this data also from the back view controller the A.
You can use the prepareForSegue method to pass parameters from one view to another.
Stack overflow already has an answer for this: How to pass prepareForSegue: an object