0

Alright let's say I have two ViewController, FirstViewController that contains a table and the CustomCell. I set up the action of the button in the CustomCell and it does what it is supposed to do but I want to call the [tableView reloadData] function in my FirstViewController. What is the proper way of calling this function after the button is selected? Is there a way to set up something in FirstViewController that gets called when the Button in the other Class is selected?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Yannick
  • 3,210
  • 1
  • 21
  • 30

1 Answers1

1

You're best bet, if I understand your question correctly, is to use the Delegate Protocol in the second view, which returns a message to the first view controller.

See my answer here on how to setup a delegate:

How to declare events and delegates in Objective-C?

Community
  • 1
  • 1
CW0007007
  • 5,681
  • 4
  • 26
  • 31