objective c - ViewController Delegate -


is possible access viewcontroller's methods appdelegate, possible inverse following code:?

appdelegate *ad = (appdelegate *) [[uiapplication sharedapplication] delegate]; 

when try

viewcontroller *vc = (viewcontroller *) [[uiapplication sharedapplication] delegate]; 

i error...

thanks!

viewcontroller *vc = (viewcontroller *)[uiapplication sharedapplication].keywindow.rootviewcontroller; 

or if delegate have properties

yourappdelegate *ad = (yourappdelegate*)[uiapplication sharedapplication].delegate; viewcontroller *vc = ad.yourviewcontrollerproperty; 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -