Here’s how I set up my app. I have a root view that loads a subview over the top of it during the viewDidLoad method. In the subview I have a button that, when clicked, hides itself and reveals the root view. Everything is working great, but I hate having a view that is loaded but is not in use. I tried to put a method in the delegate that does this:
[theLaunch release];
…where theLaunch is my Subview.
This method, located in my delegate, is called hidetheLaunch.
Then I was trying to call this method from within the subview:
[[UIApplication sharedApplication].delegate hidetheLaunch];
But it says -hidetheLaunch not found in protocol.
Am I doing this all wrong?
Thanks in advance!
You need to first cast the
UIApplicationDelegateto your specific delegate’s type: