Reputation: 3278
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?
Upvotes: 0
Views: 145
Reputation: 5681
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?
Upvotes: 1