I have one viewController that calls one TableViewController... the user selects one element in the table and I want to close the tableviewcontroller and to share what the user selected with the first controller.
Which is the easiest way to do it?
I have one viewController that calls one TableViewController... the user selects one element in the table and I want to close the tableviewcontroller and to share what the user selected with the first controller.
Which is the easiest way to do it?
Protocols and delegate are made for these purposes only i.e do something at some place when an event is occurred .. Rest it depends on you and your requirements.
Please check this answer
What's the best way to communicate between view controllers?
How do I share an object between UIViewControllers on iPhone?
If you are using storyboard