iphone - Unable to access method in the delegate -


here's how set app. have root view loads subview on top of during viewdidload method. in subview have button that, when clicked, hides , reveals root view. working great, hate having view loaded not in use. tried put method in delegate this:

[thelaunch release]; 

...where thelaunch subview.

this method, located in delegate, called hidethelaunch.

then trying call method within subview:

[[uiapplication sharedapplication].delegate hidethelaunch]; 

but says -hidethelaunch not found in protocol.

am doing wrong?

thanks in advance!

you need first cast uiapplicationdelegate specific delegate's type:

[((myappdelegate *) [uiapplication sharedapplication].delegate) hidethelaunch]; 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -