How do I refer to the preceding view controller’s properties and iboutlets in a uinavigationcontroller stack of views?
For instance, say the first screen has a high score uilabel, and the second screen is the game. How would I update this label from the game screen before popping back to it?
EDIT
Thanks for the answers. I think I will use Key Value Observing to change a Singleton classes highScore method. This blog post was useful in understanding how to do this: http://www.bit-101.com/blog/?p=1969
You could use Key-Value Observing on a property of some object. Say you pass an Object to a view controller that you push on your navigation controller called PlayerState. The first view controller could observe this property
Then every time the high score object changes you will get notified by implementing following function
This method improves upon several of the other methods because it decouples the implementation of the placement of your view controllers and the game logic. You might change where the high score is displayed, but you always want it to be changed if the underlying object changes. Notifications is a very similar way of doing this but requires you to post a notification each time you change the high score object. KVO will do this automatically.