-3

I have 2 class. In first class I use didSelectrowAtIndexPath: method. In second class I have textfield. I create string in didSelectrowAtIndexPath: method. I want to set textfield text when I click tableview cell then open second view. But when I click row firstly run second class's viewdidload: before didselect method. And my string get nil value.

How can fix that problem ?

[EDİT]

Solve it. With this tutorial.

1 Answers1

0

You can use prepareforsegue: method to pass the data from viewcontroller A to B on click on tableview cell

Check out this answer :

Community
  • 1
  • 1
PunjabiCoder
  • 525
  • 2
  • 8