How to pass data between 2 VCs

Hi guys, i got a weird problem with my app, i would love to pass one data from a VC(like SettingsViewController) to the main VC. now when i use the delegation pattren it aint working for some reason( it doesnt call the function in the delegate), even if i use directly and try to use the variable it doesnt work.



You may be doing something wrong somewhere in your code. But we cannot say what and where as you are not showing any code.

Please show enough code to reproduce the issue.
There may be several reasons:
  • You have not set the delegate correctly

  • class do not conform to the delegate protocol you have defined

But show code of both classes to really understand.

Note: when you post a question on the forum, it is not enough to say: this does not work.
You need to show the code that you think should produce the expected result.
How to pass data between 2 VCs
 
 
Q