Accessing functions in a parent controller
Posted
by meridimus
on Stack Overflow
See other posts from Stack Overflow
or by meridimus
Published on 2010-04-12T11:39:19Z
Indexed on
2010/04/12
11:43 UTC
Read the original article
Hit count: 288
I have made a ViewController in XCode for an iPhone project I'm working on, but I have a question about nested ViewControllers and what the best way to access a parents ViewController functions?
Essentially, at the moment I have a SwitchViewController with MenuViewController (nested) and GameViewController (nested, which renders OpenGL ES).
At the moment, I have animated view switching controlled in the SwitchViewController which works. But I want to call it after a player has selected the level from the MenuViewController and run the appropriate level in GameViewController. Not rocket science, I know.
What's the best way to call parent functions?
© Stack Overflow or respective owner