0

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?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Usi Usi
  • 2,967
  • 5
  • 38
  • 69

2 Answers2

1

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.

Tarun
  • 766
  • 1
  • 5
  • 12
0

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

iOS storyboard passing data navigationViewController

Community
  • 1
  • 1
AAV
  • 3,785
  • 8
  • 32
  • 59