tags:

views:

33

answers:

1

can anyone show me how to implement a var that displays a true value on user input and this value can be used in other controllers to add a value to a different controller... i would like to use this code to signal arrays to add objects. If anyone has a better way to implement this I would appreciate that too.

I have an ibaction that requires a uibutton to be clicked. When this button is clicked i want a variable to be triggered. add favorites lets say.

When this variable is triggered i want to go to another controller and say if variable = true add this object to the array.

A: 

If you want the changes in a property to trigger things to happen in other objects I think Key-Value Observation is what you need. Or you couild just call a method on your other controller from the action.

JeremyP