I have two ViewController. The first contains and displays an array with values. The second is a picker view (modal view controller) that permits to choose a columns to add on the array (with a button "ADD"). But, I don't know how retrieve an event when user click on "ADD" button to refresh my array because IBaction function and the array are not in the same controller.
Thanks for your help.
Protocols can be helpful for such situations.
A protocol is simply a list of method declarations, unattached to a class definition.
Protocols can be helpful in a number of scenarios, a common usage is to define methods that are to be implemented by other classes. A familiar example is when using a tableview, your class implements the cellForRowAtIndexPath method which asks for cell content to insert into a table – the cellForRowAtIndexPath method is defined within the UITableViewDataSource protocol.